xref: /aosp_15_r20/external/executorch/.ci/docker/common/install_linter.sh (revision 523fa7a60841cd1ecfb9cc4201f1ca8b03ed023a)
1#!/bin/bash
2# Copyright (c) Meta Platforms, Inc. and affiliates.
3# All rights reserved.
4#
5# This source code is licensed under the BSD-style license found in the
6# LICENSE file in the root directory of this source tree.
7
8set -eux
9
10# shellcheck source=/dev/null
11source "$(dirname "${BASH_SOURCE[0]}")/utils.sh"
12
13# NB: Install all linter dependencies, the caching of lintrunner init could be
14# done after Executorch becomes public
15pip_install -r requirements-lintrunner.txt
16
17# Install google-java-format
18curl -L --retry 3 https://github.com/google/google-java-format/releases/download/v1.23.0/google-java-format_linux-x86-64 > /opt/google-java-format
19chmod +x /opt/google-java-format
20