Skip to content

Good practice on how to update examples

Roman Ivanov edited this page Jan 24, 2021 · 5 revisions

please make sure that documentation is looks like (if Check has few properties, we need to have few examples to show how each property works):

<<default config>>
<<code sample with violations and without>>
some words explanation for config below
<<config>>
<<code sample  with violations and without>>
some words explanation for config below
<<config>>
<<code sample with violations and without>>

ATTENTION: example java code block should not be different all the time. We need single/same java code block that used for all configs, so user will easily see how Check behavior is changing by simply manipulation in config. Because user do not want to change his code, he want to adjust Check to his preference and his expectations.

MAKE SURE that command mvn verify pass without violations. Failure of XdocsJavaDocsTest.testAllCheckSectionJavaDocs means that you need to sync documentation content between xml and java file.

Please share in PullRequest (PR) screenshot (drag and drop image to PR description) of how website looks like after your update. You can generate web site by command https://github.com/checkstyle/checkstyle/wiki/How-to-run-certain-phases-and-validations#how-to-generate-website-only

Please share prove that your samples works in our latest release as you describe in documentation. Please use our CLI tool and share output on all new samples in format of https://github.com/checkstyle/checkstyle/blob/master/.github/ISSUE_TEMPLATE/bug_report.md (only terminal output)

Good example of how PullRequest (PR) should looks like - https://github.com/checkstyle/checkstyle/pull/7634 .

Clone this wiki locally