richardwooding/codemetrics complexity gate
Fail a PR when a function it changes exceeds a cyclomatic/cognitive complexity threshold (diff mode).
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| paths | Space-separated files/directories to analyze. | — | . |
| max-cognitive | Fail when a changed function's cognitive complexity exceeds this (0 = disabled). | — | 15 |
| max-cyclomatic | Fail when a changed function's cyclomatic complexity exceeds this (0 = disabled). | — | 0 |
| base-ref | Base git ref to diff against. Defaults to the pull request's base branch. | — | ${{ github.base_ref }} |
| baseline | Optional baseline file; findings recorded in it are suppressed (only new ones fail). | — | "" |
| sarif-file | If set, also write SARIF results here (upload with github/codeql-action/upload-sarif). | — | "" |
| fail-on-findings | Fail the job when new findings remain in the diff (true/false). | — | true |
| codemetrics-version | codemetrics release to install (e.g. "v0.7.0") or "latest". | — | latest |
| github-token | Token used to download the release binary. | — | ${{ github.token }} |
Outputs
no outputs