Repository navigation
grounds 0.0.4
Precision release from dogfooding on 21 projects and a comparison with PMD. Still experimental. The binary is for Apple Silicon, macOS 11+; on other platforms, build from source or use the Nix flake.
curl -fsSL https://github.com/mihaidaniel34/grounds/releases/download/v0.0.4/grounds-0.0.4-aarch64-apple-darwin.tar.gz | tar -xz
sudo mv grounds-0.0.4-aarch64-apple-darwin/grounds /usr/local/bin/Not notarized: after a browser download, xattr -d com.apple.quarantine grounds.
New
scripts/corpus.sh: a regression corpus of 21 open-source projects pinned to fixed commits. It fails on any parse error, on any compile-break or DI finding, or when a planted bug is no longer reported. All other changes show up as a diff against a baseline.scripts/pmd_compare.py: runs PMD 7 with the rules grounds cites and shows per rule what both find, what only grounds finds, and what only PMD finds.grounds check --root R pathnow resolves relative paths againstR. A missing path is an error, where before it silently analyzed nothing.
Fixed since 0.0.3
builder.countread from an enclosing class was resolved as the outercount. That caused 1,524 false "unused private field" reports on the corpus.- Deeply nested generic calls (Hamcrest matcher trees) made type inference exponential, and one helidon test hung. It now takes milliseconds.
- Error-level false positives found by reviewing every error on the eight newest projects (273 in 12 patterns). Examples:
- custom
@...Mappingannotations; - lambda arguments that select another overload;
equalscontract tests;List.of(byte[]);- AssertJ checks followed by
describedAs; - local-class field initializers.
- custom
test-without-assertionaccepts harness helpers inherited from a test base class, such as OpenRewrite'srewriteRun(about 10,800 fewer findings). Same-class asserting helpers are recognized; this check had never run before.- Imports used only in Javadoc links that wrap lines or name parameter types are no longer reported as unused.
- Recall and precision fixes in:
lost-stack-trace,catch-throwable,literal-first-in-comparison;private-constructor-class-not-final,utility-class-instantiable(it no longer suggests a private constructor for a class some file instantiates);- the naming rules,
useless-override,reference-equality-value-type.
- Corpus hardening:
- parsing of
finalin patterns and//inside text blocks; - a stack overflow on raw supertypes;
- Lombok
@FieldDefaults(makeFinal),@Builder.Defaultand@WithonisX; - Spring conditional scan roots, beans registered by
BeanDefinitionRegistryPostProcessor, and Mockito mock beans.
- parsing of
- Eight rules cited the wrong PMD or Sonar rule; two used deprecated PMD names.
- Reviewed in four rounds by gpt-6-astra. Every finding has a regression fixture.
The on-disk cache format changed (version 25), so the first run rebuilds it.