v0.1.1
gruff-php 0.1.1
An onboarding-focused follow-up to 0.1.0. The headline additions are an init command, an interactive prompt when you run a scan without a config, expanded docs, and a lockfile security audit in CI.
gruff-php is a heuristic PHP code-quality scanner that reports findings for the terminal, CI, GitHub annotations, SARIF, HTML, or a local dashboard. Pair it with PHPStan, PHPUnit, PHP-CS-Fixer, or Psalm - it doesn't replace type checking or tests.
What you get
- 120 rules across 11 pillars: size, complexity, maintainability, dead-code, naming, documentation, modernisation, security, sensitive-data, test-quality, design. Run
list-rulesto see them all. - Commands:
analyse,summary,report,dashboard,list-rules,init. analyseoutput formats: text, json, html, markdown, github, hotspot, sarif.- YAML config at
.gruff-php.yaml, with strict unknown-key rejection. - Baselines to suppress known findings without disabling rules.
- Branch review:
--diff,--diff-vs=<base>,--changed-only. - Optional Infection mutation analysis, with baselines and budgets.
New in 0.1.1
initwrites a.gruff-php.yamlfrom registry defaults, with an ignore list covering agent harness dirs, generated reports, fixtures, and vendored copies.--forcekeeps any existing ignore list and is required to overwrite a legacy.gruff.yaml.--project-root <dir>writes somewhere other than the current directory.- If you run
analyse,summary,report, ordashboardin a terminal with no config, it now offers to runinitfor you. The prompt only fires after option validation, so a bad command no longer leaves a stray config file. Prompt text goes to STDERR, so JSON, SARIF, and HTML on STDOUT stay parseable. - Three test-quality rules now run by default:
multiple-aaa-cycles(minCycles 3),mocking-domain-object, andtestdox-readability(minWords 2). summarynow tells you how to baseline -analyse --generate-baselineto record current findings as known debt, or--no-baselineto audit without one.composer audit:dependenciesruns insidecomposer checkand CI verify, failing the build on known security advisories. New helper scriptsdependency-install.shanddependency-update.shwrap the Composer commands; the release preflight script is now stricter.- README rewritten. New
docs/guides cover the rule catalogue, CI integration, configuration, output formats, dashboard, naming conventions, and releasing.