Adding lints¶
There are two enums in the code are the main drivers of how lints operate:
LintCheckenumcontains all the lint checksLintErrorenumcontains all the errors that can be produced by theLintCheck::check()method
If you want to add a new lint to scilo, there are a few places you'll need to make changes.
- Add a new variant to the
LintCheckand add amatchcase toLintCheck::check()for the new variant. - Add a new error variant to the
LintError, if appropriate, and add user-friendly error messages. - Add the lint's code and description to the Lints page in alphabetical order.
- Add the lint's code to the default value for the
lintsconfiguration option and in the defaultconfig.tomlfile in thelibscilocrate.
If there is a new configuration option that is required to accommodate this new lint, see Updating the configuration file.