From 966e2d41544a7ccbcf901355b8116734c448aa63 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Thu, 4 Jun 2020 14:19:10 -0700 Subject: [PATCH] pre-commit also handles pylint --- .github/workflows/test.yaml | 5 +---- Dockerfile.openpilot | 1 - pylint_openpilot.sh | 11 ----------- 3 files changed, 1 insertion(+), 16 deletions(-) delete mode 100755 pylint_openpilot.sh diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 9dcbed9e..ced9fe65 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -36,8 +36,7 @@ jobs: external/bin selfdrive/modeld/runners $TEST_DIR # need these so docker copy won't fail - cp Pipfile Pipfile.lock pylint_openpilot.sh .pylintrc \ - cppcheck_openpilot.sh .coveragerc-app .pre-commit-config.yaml $TEST_DIR + cp Pipfile Pipfile.lock .pylintrc cppcheck_openpilot.sh .coveragerc-app .pre-commit-config.yaml $TEST_DIR cd $TEST_DIR mkdir laika laika_repo tools release - name: Build Docker image @@ -73,8 +72,6 @@ jobs: submodules: true - name: Build Docker image run: eval "$BUILD" - - name: pylint - run: $RUN "cd /tmp/openpilot/ && ./pylint_openpilot.sh" - name: pre-commit run: $RUN "cd /tmp/openpilot/ && git init && git add -A && pre-commit run --all" - name: cppcheck diff --git a/Dockerfile.openpilot b/Dockerfile.openpilot index d2956b81..ec4ee189 100644 --- a/Dockerfile.openpilot +++ b/Dockerfile.openpilot @@ -78,7 +78,6 @@ RUN mkdir -p /tmp/openpilot COPY SConstruct \ cppcheck_openpilot.sh \ - pylint_openpilot.sh \ .pylintrc \ .pre-commit-config.yaml \ .coveragerc-app \ diff --git a/pylint_openpilot.sh b/pylint_openpilot.sh deleted file mode 100755 index 910c5cd0..00000000 --- a/pylint_openpilot.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -python3 -m pylint --disable=R,C,W $(eval echo <(find cereal) <(find opendbc) $(cat release/files_common release/files_common | tr '\n' ' ') | tr ' ' '\n' | grep "\.py$") - -exit_status=$? -(( res = exit_status & 3 )) - -if [[ $res != 0 ]]; then - echo "Pylint found errors in the code. Please fix and try again" - exit 1 -fi