Checks your small code examples in the readme, module headers and declaration comments for valid syntax, matching types and correctness by generating tests from these code snippets.
import Review.Documentation.CodeSnippet
config =
[ Review.Documentation.CodeSnippet.check
]
Ruleto generate tests from your documentation examples (readme, module header, declaration comment) and also to report syntax errors for these code snippets. There are two kinds of checks:value checks
This verifies that the actual value of the expression before
-->is the same as the expected value after-->.type checks
important The rule will only report syntax and type errors if your code snippet contains at least one of these two checks, so replace
with
Both checks will be run on all modules and the readme. If you want to disable this for e.g. generated or vendored code, use
Review.Rule.ignoreErrorsForDirectories