Metadata-Version: 2.5
Name: badgerp_analysis
Version: 0.1.0
Summary: Count diagnostics in SARIF, ESLint JSON, or Ruff JSON reports
Project-URL: Documentation, https://philocalyst.tngl.io/Badger/plugins.html
Project-URL: Repository, https://tangled.org/largo.tngl.sh/plugin-analysis
Project-URL: Issues, https://tangled.org/largo.tngl.sh/plugin-analysis/issues
Author: Philocalyst
License-Expression: BlueOak-1.0.0
License-File: LICENSE.md
Keywords: badge,badge-plugin,badger
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development
Requires-Python: >=3.11
Description-Content-Type: text/markdown

# badgerp_analysis

A single diagnostic pipeline reads three standard saved formats: SARIF 2.1.0,
ESLint JSON and Ruff JSON. It never starts a scan or uploads source.

```python
badge(
    primary=color("#24292f"),
    secondary=color("#0969da"),
    producer=analysis(report="report.sarif", format="sarif"),
)
```

`level` selects `all`, `error`, `warning`, `note`, or `none`. SARIF rule defaults
are respected; explicit result levels win. Counts include suppressed findings;
`pass` and `notApplicable` results are excluded. Runs with failed invocations,
error-level execution/configuration notifications, null results, or external
result references fail explicitly rather than showing green. No runs is not a
successful scan. ESLint counters must match its diagnostic messages. Ruff has
no severity field, so diagnostics are counted as warnings.

The format must be explicit: empty Ruff/ESLint arrays mean `0 reported` only
under that selected format. This is not a security verdict, validation of the
whole report schema, or report-freshness check. Local JSON is limited to 4 MiB;
duplicate keys and nonfinite numbers are rejected.

Sources: [SARIF](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html),
[ESLint](https://eslint.org/docs/latest/integrate/nodejs-api),
[Ruff](https://docs.astral.sh/ruff/settings/).
Fixtures: `fixtures/sarif.json`, `fixtures/eslint.json`, `fixtures/ruff.json`.
