Add Agent Playbook section for automated updates - #134
Conversation
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
Pull Request Overview
This PR successfully introduces an 'Agent Playbook' section to the README.md, providing clear, standardized guidance for both human and AI contributors. The documentation addresses all acceptance criteria, including file versioning, PMD update procedures, and local testing instructions.
Two minor typographical errors were identified in directory paths for the RuleSets.scala file. These do not prevent merging but should be corrected for clarity and consistency with the actual project structure.
TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback
| ```bash | ||
| sbt "runMain com.codacy.pmd.DocGenerator" | ||
| ``` | ||
| This rewrites `docs/patterns.json`, `docs/description/description.json`, `docs/description/*.md`, and `src/main/scala/com.codacy/pmd/RuleSets.scala`. Review the diff for new/removed/renamed rules and stale fixtures under `docs/tests/`/`docs/multiple-tests/`. Watch the console output for `Ruleset ... is missing from rulesets.properties` warnings. |
There was a problem hiding this comment.
⚪ LOW RISK
Nitpick: Consistent with the previous mention, the directory path for RuleSets.scala should use a slash instead of a dot: 'src/main/scala/com/codacy/pmd/RuleSets.scala'.
| - `docs/tests/*` and `docs/multiple-tests/*` — fixtures used by `codacy-plugins-test` to validate the engine against real code samples. | ||
| - `docs/tool-description.md` — short blurb about the tool, hand-maintained. | ||
|
|
||
| All the generated artifacts above come from **`DocGenerator`** (`src/main/scala/com/codacy/pmd/DocGenerator.scala`, run via `sbt "runMain com.codacy.pmd.DocGenerator"`). Unlike some sibling Codacy engines, it does **not** clone an external GitHub repo — it reads the ruleset XML files bundled as classpath resources inside the `pmd-*` jars that were just resolved for the new `toolVersionKey`, via `ResourceHelper`/`Languages`/`RuleSets`. It also regenerates `src/main/scala/com.codacy/pmd/RuleSets.scala` (marked `AUTOGENERATED: DO NOT CHANGE HERE`). This means an sbt dependency resolution (network access to Maven Central) is enough — no separate git clone or pandoc is needed here. |
There was a problem hiding this comment.
⚪ LOW RISK
Nitpick: The path 'src/main/scala/com.codacy/pmd/RuleSets.scala' appears to have a typo; it should be 'src/main/scala/com/codacy/pmd/RuleSets.scala' to match standard directory structures and the path used for DocGenerator.
Summary
Test plan