bochmann-software/CodeCharter

Analyze .NET code quality and annotate pull requests with violations

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
solutionPath to the .sln, .slnx, or .csproj file, relative to the repository root. Leave empty to auto-discover: the action picks the first .sln/.slnx it finds (shallowest directory first, then alphabetical), or the first .csproj when no solution file exists. Set this explicitly when the repository has several. no""
api-keyYour CodeCharter portal API key. Generate one at https://codecharter.tools/api-keys and store as a repository or organization secret named CODECHARTER_API_KEY. yes
rulesPath to a local rules directory in your repository (e.g. rules), passed to the CLI as `--rules`. Leave empty to let the CLI use its own default: a `rules` directory in the repository root if one exists, otherwise the sample rules bundled with the CLI. no""
require-rulesFail the run instead of silently falling back to the CLI's bundled sample rules. When 'true' and neither `rules` is set nor a `rules/` directory exists in the repository root, the step fails with an actionable message. Leave 'false' (default) to allow the bundled-rules fallback; a warning is logged whenever that fallback is used either way. nofalse
fail-onExit with a failure when any violation reaches this level (error | warn | info | never).noerror
severity-thresholdMinimum severity to report and annotate (error | warn | info).noinfo
diffScope the analysis to only changed lines. One input, interpreted by value: - 'false' (default) — analyze the whole solution. - 'true' — on pull requests, diff against the base branch (merge-base..head). Ignored (with a warning) on non-PR events. - a git ref range, e.g. 'main..HEAD' or 'origin/main..HEAD'. - a path to a unified diff file in the repository. In every diff mode both the reported findings and the fail-on gate apply only to changed lines. The diff is computed on the runner, so check out enough history (actions/checkout with fetch-depth: 0) for the compared commits to be reachable. nofalse
baselinePath to a baseline file (relative to the repo root, or absolute) recording accepted findings. When set, both the reported findings and the fail-on gate apply only to findings NOT in the baseline, so existing findings are tolerated and only new ones fail the build. Generate the file with the CLI's `--write-baseline` and commit it. A missing file analyzes everything (with a warning); a corrupt file fails the run. Composes with `diff`. Requires a CLI with baseline support (`version: latest`, the default, satisfies it). no""
telemetryOpt-in telemetry. When 'true', the run sends one anonymous usage event (tool name, latency bucket, per-rule finding counts, hashed workspace id) to the CodeCharter endpoint, authenticated with the short-lived license the CLI already mints from `api-key`. Off by default; no source, file paths, or code are ever sent. Requires a CLI with telemetry support (`version: latest`, the default, satisfies it). nofalse
versionCodeCharter CLI version selector. Use 'latest' (recommended), 'v1', 'v1.4', or an exact pin like 'v1.4.2'. nolatest
portal-base-urlCodeCharter portal base URL. Override only if pointing at a self-hosted portal or staging environment. nohttps://codecharter.tools
commentPost (and update) a sticky summary comment on the pull request. Requires `permissions: pull-requests: write`. Set to 'false' to rely on inline annotations only. notrue
cacheCache the downloaded CLI binary between runs (via the Actions cache) to skip re-downloading it each run. Set to 'false' to always download. notrue
comment-keyDiscriminator for the sticky PR comment. Leave empty to derive it from the workflow, job, and solution (so multiple CodeCharter steps in one PR each keep their own comment). Set an explicit value to control which runs share a comment (e.g. a matrix dimension) or to merge several into one. no""
sarif-outputIf set, additionally write a SARIF v2.1 file to this path (relative to the repository root) for upload to GitHub Code Scanning. Leave empty to skip. no""
github-tokenToken used to post the PR comment. Defaults to the workflow token.no${{ github.token }}
namedescription
findings-totalTotal number of findings.
findings-errorNumber of error-level findings.
findings-warnNumber of warning-level findings.
findings-infoNumber of info-level findings.
sarif-pathPath to the generated SARIF file, if sarif-output was set.