mirror of
https://github.com/curl/curl.git
synced 2026-07-27 20:13:07 +03:00
GHA: add a job to check function complexity
- Done with the new top-complexity script which uses the pmccabe tool. - Any function scoring over 100 makes the test fail - The script outputs all functions scoring over 70 - Two >100 functions are whitelisted by name, but they are not allowed to increase their scores. Closes #17398
This commit is contained in:
parent
4a2bd8e458
commit
203b4349af
3 changed files with 146 additions and 1 deletions
20
.github/workflows/checksrc.yml
vendored
20
.github/workflows/checksrc.yml
vendored
|
|
@ -94,6 +94,26 @@ jobs:
|
|||
- name: REUSE Compliance Check
|
||||
uses: fsfe/reuse-action@bb774aa972c2a89ff34781233d275075cbddf542 # v5
|
||||
|
||||
complexity:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 3
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
name: checkout
|
||||
|
||||
- name: install pmccabe
|
||||
run: |
|
||||
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
|
||||
sudo apt-get -o Dpkg::Use-Pty=0 update
|
||||
sudo rm -f /var/lib/man-db/auto-update
|
||||
sudo apt-get -o Dpkg::Use-Pty=0 install \
|
||||
pmccabe
|
||||
|
||||
- name: check complexity scores
|
||||
run: ./scripts/top-complexity
|
||||
|
||||
miscchecks:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue