Skip to content

Nothing checks the docs' version list, /fly messages and permission default against their sources #42

Closed

Description

@dmccoystephenson

Observation

Three facts are copied by hand from their source into the Markdown docs, and nothing in mvn clean package compares the copies with the source:

Fact Source Copies
Supported Minecraft versions minecraft-versions.json the "currently ..." sentences in README.md and USER_GUIDE.md
/fly messages the sendMessage calls in Main.java COMMANDS.md, USER_GUIDE.md, and the manual validation steps in README.md
FlyCommand.fly permission and default Main.java, plugin.yml the permissions table in USER_GUIDE.md, the command table in COMMANDS.md, CONFIG.md

FlyCommandTest pins the messages to hard-coded strings in the test, not to the docs. PluginManifestTest pins the permission default the same way. README.md tells contributors that a new supported version has to be added to the two lists by hand, and the Build workflow's API check reads only the JSON file.

Fixes of this kind of drift have so far been made by hand: #32 and #38 corrected docs after the fact, and the 1.0.0 changelog entry claimed COMMANDS.md listed the exact messages before it did.

Proposed change

A test class in src/test/java should read the docs alongside the sources above and fail the build when they disagree. The docs are already correct as of 353d7f9, so no behaviour changes.

This should also correct the README.md Testing section, which says the suite reads "the plugin.yml packed into the jar". Surefire runs before maven-jar-plugin in mvn clean package, so no jar exists at that point; the suite reads the filtered copy in target/classes, which is what the jar is then built from.

This issue was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions