From 08bf7aba95097d935eaabbda2366a8fd3d6d30fc Mon Sep 17 00:00:00 2001 From: Benjamin De Vierno <54540257+bdevierno1@users.noreply.github.com> Date: Tue, 12 May 2020 22:35:18 +0800 Subject: [PATCH] [CI] Update Verbosity This PR updates the Github actions CI to no longer check for indentation and naming convention. We also removed the comment bot. Commit log: * Updated verbosity level * Update verbosity * Update verbosity * Removed Comment action * Testing Comment Bot * Testing comment bot * Testing * Testing * Testing * Testing * Removed Comment bot --- .github/workflows/Linter.yml | 19 +++---------------- style/github-action-style.md | 1 - style/run-lint.py | 2 +- style/run-lint.sh | 2 +- 4 files changed, 5 insertions(+), 19 deletions(-) diff --git a/.github/workflows/Linter.yml b/.github/workflows/Linter.yml index c3d82b41e..d265ee554 100644 --- a/.github/workflows/Linter.yml +++ b/.github/workflows/Linter.yml @@ -9,11 +9,9 @@ jobs: # If Branch name is not develop, comment - name: Test Branch Name if: github.base_ref != 'develop' - uses: mshick/add-pr-comment@v1 - with: - message: | - **Please Set PR to develop. 😊** - repo-token: ${{ secrets.GITHUB_TOKEN }} + run: | + echo 'Please PR on develop branch.' + exit 1 C: runs-on: ubuntu-latest steps: @@ -26,7 +24,6 @@ jobs: chmod +x style/run-lint.sh style/run-lint.sh c Cppcheck: - needs: [Branch] runs-on: ubuntu-latest steps: - name: Checkout @@ -68,13 +65,3 @@ jobs: run: | chmod +x style/run-lint.sh style/run-lint.sh shell - Comment: - needs: [Branch,C,Cppcheck,Python,Shell] - runs-on: ubuntu-latest - steps: - - name: Add Comment - uses: mshick/add-pr-comment@v1 - with: - message: | - **All Lint Tests Passed!🚀** - repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/style/github-action-style.md b/style/github-action-style.md index 66cbd5188..b02c73ba3 100644 --- a/style/github-action-style.md +++ b/style/github-action-style.md @@ -73,7 +73,6 @@ The workflow has five separate jobs that run concurrently. * **C** -- Lints C files for styling errors with gwclint.py * **Python** -- Lints Python files with pylint. * **Shell** -- Lints bash shell script files with shellcheck -* **Comment** -- If all five previous jobs have passed, comment 'All Lint Tests Passed' ## Other Resources diff --git a/style/run-lint.py b/style/run-lint.py index 3cb89a6b3..71e282ed1 100644 --- a/style/run-lint.py +++ b/style/run-lint.py @@ -35,7 +35,7 @@ def gwlint_output(file_name): lint_lines = os.popen(get_python_lint_cmd).read().splitlines() # If lint with gwclint remove the last line of lint: "Done processing example-filename.c" - if sys.argv[1] == "python ./style/gwclint.py --verbose=2": + if sys.argv[1] == "python ./style/gwclint.py --verbose=4": lint_lines = lint_lines[:-1] # If linting with cppcheck, we only want errors. Remove lines such as Checking..." elif sys.argv[1] == "cppcheck": diff --git a/style/run-lint.sh b/style/run-lint.sh index f690df267..44859946d 100755 --- a/style/run-lint.sh +++ b/style/run-lint.sh @@ -30,7 +30,7 @@ case "$1" in python3 "style/run-lint.py" "pylint" "*.py" ;; "c") echo $'Running C Lint.\n' - python3 "style/run-lint.py" "python ./style/gwclint.py --verbose=2" "'*.c' '*.cpp' '*.h' | grep -v 'cJSON' | grep -v 'ndpi'" + python3 "style/run-lint.py" "python ./style/gwclint.py --verbose=4" "'*.c' '*.cpp' '*.h' | grep -v 'cJSON' | grep -v 'ndpi'" ;; "cppcheck") echo $'Running cppcheck Lint.\n' python3 "style/run-lint.py" "cppcheck" "'*.c' '*.cpp' '*.h' | grep -v 'cJSON' | grep -v 'ndpi'"