From ece114cf996668b0c30295bf44b03f7012f5c9a6 Mon Sep 17 00:00:00 2001 From: Naren Dasan Date: Tue, 10 Nov 2020 14:43:47 -0800 Subject: [PATCH] feat(//.github): Moving to python directly Signed-off-by: Naren Dasan Signed-off-by: Naren Dasan --- .github/scripts/run_cpp_linter.py | 2 +- .github/scripts/run_py_linter.py | 2 +- .github/workflows/linter.yml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/scripts/run_cpp_linter.py b/.github/scripts/run_cpp_linter.py index 6cacc850b4..b64306efe1 100644 --- a/.github/scripts/run_cpp_linter.py +++ b/.github/scripts/run_cpp_linter.py @@ -16,7 +16,7 @@ pr = repo.get_pull(pr_number) commit = repo.get_commit(pr.base.sha) -output = subprocess.run(["bazel", "run", "//tools/linter:cpplint_diff", "--", "--no-color", "//..."], stdout=subprocess.PIPE) +output = subprocess.run(["python3", "tools/linter/cpplint_diff.py", "--no-color", "//..."], stdout=subprocess.PIPE) comment = '''Code conforms to C++ style guidelines''' approval = 'APPROVE' diff --git a/.github/scripts/run_py_linter.py b/.github/scripts/run_py_linter.py index 93c0fccce9..8b5f5e233d 100644 --- a/.github/scripts/run_py_linter.py +++ b/.github/scripts/run_py_linter.py @@ -16,7 +16,7 @@ pr = repo.get_pull(pr_number) commit = repo.get_commit(pr.base.sha) -output = subprocess.run(["bazel", "run", "//tools/linter:pylint_diff", "--", "//..."], stdout=subprocess.PIPE) +output = subprocess.run(["python3", "tools/linter:pylint_diff", "//..."], stdout=subprocess.PIPE) comment = '''Code conforms to Python style guidelines''' approval = 'APPROVE' diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 44807d0fbc..182396c69d 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -47,5 +47,6 @@ jobs: - name: Install dependencies run: | docker exec pylinter bash -c "pip3 install -r /workspace/.github/scripts/requirements.txt" + docker exec pylinter bash -c "pip3 install -r /workspace/tools/linter/requirements.txt" - name: Lint Python run: docker exec pylinter bash -c "cd /workspace && python3 /workspace/.github/scripts/run_cpp_linter.py"