From 86fd5b9f1a2fc728bbe74f52ad112f5361ba8dc6 Mon Sep 17 00:00:00 2001 From: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com> Date: Thu, 1 Oct 2020 12:41:34 -0400 Subject: [PATCH 1/3] Add Code complexity check --- .github/workflows/ci.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 21ce567e9..e7a1e2444 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,12 +40,6 @@ jobs: lcov --rc lcov_branch_coverage=1 --remove test/unit-test/build/coverage.info '*third-party*' --output-file test/unit-test/build/coverage.info lcov --rc lcov_branch_coverage=1 --remove test/unit-test/build/coverage.info '*mocks*' --output-file test/unit-test/build/coverage.info lcov --list test/unit-test/build/coverage.info - #- name: lcov-cop - # uses: ChicagoFlutter/lcov-cop@v1.0.2 - # with: - # path: "build/coverage.info" - # min_coverage: 99 - # exclude: "**/*test*" formatting: runs-on: ubuntu-latest @@ -65,3 +59,14 @@ jobs: else exit 0 fi + + complexity: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup + run: sudo apt-get install complexity + - name: Complexity + run: | + find source/ -iname '*.c' |\ + xargs complexity --scores --threshold=0 --horrid-threshold=8 From 13915e27dcd80ba173db21b71b51d6eb98ab3ca1 Mon Sep 17 00:00:00 2001 From: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com> Date: Thu, 1 Oct 2020 12:44:25 -0400 Subject: [PATCH 2/3] Update the location of source files --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e7a1e2444..3b9a46c9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,5 +68,5 @@ jobs: run: sudo apt-get install complexity - name: Complexity run: | - find source/ -iname '*.c' |\ + find . -iname '*.c' |\ xargs complexity --scores --threshold=0 --horrid-threshold=8 From 5246c3fe06882e3bca271a10cefc1c9056b66f62 Mon Sep 17 00:00:00 2001 From: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com> Date: Thu, 1 Oct 2020 12:46:51 -0400 Subject: [PATCH 3/3] Update the Code Complexity threshold --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b9a46c9f..6b15d63e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,4 +69,4 @@ jobs: - name: Complexity run: | find . -iname '*.c' |\ - xargs complexity --scores --threshold=0 --horrid-threshold=8 + xargs complexity --scores --threshold=0 --horrid-threshold=55