Publish generated list of rules on documentation website by per1234 · Pull Request #261 · arduino/arduino-lint (original) (raw)

This will provide a convenient reference for information about the rules Arduino Lint applies to projects, including:

I added a bespoke "Rules > Introduction" page to give some general information about the rule system. , but the "Sketch", "Library", "Platform", and "Package index" pages are all auto-generated from the Arduino Lint source code and will be automatically updated any time rules are added or modified without any additional effort.

The rule documentation content is generated by the "ruledocsgen" Go program, which is a separate module, located in its own subfolder of the repository, similar to the standardized "docsgen" program that generates the command line reference. In order for the project infrastructure to support this supplemental module, I synced with the latest versions of the relevant "template" assets, which have had that very capability added since the time of the last sync.

The existing structure and content of the rule configurations was not sufficient for this new usage, so I adjusted and expanded on them:

Demo: https://per1234.github.io/arduino-lint/dev/rules/

Resolves #158