Dogma.Rule behaviour
The Rule behaviour, used to assert the interface used by our Rule modules.
Callbacks
Specs:
- test(%Dogma.Script{ast: term, errors: term, lines: term, path: term, processed_lines: term, processed_source: term, source: term, tokens: term, valid?: term}, List) :: []
A function that takes a Script struct, tests the script to see if it violates the rule, and returns a list of errors. The function takes a second argument as a list of key value pairs to supply config for the test.
Specs:
- test(%Dogma.Script{ast: term, errors: term, lines: term, path: term, processed_lines: term, processed_source: term, source: term, tokens: term, valid?: term}) :: []
Same as test/2 but assumes default configuration