You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: HOWTO.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,24 +15,24 @@ Updating class attributes
15
15
--------------------------
16
16
Template linter plugins are created with almost all of the Linter class attributes filled in with the default values. To make your new linter plugin functional, at the very least you need to do the following:
17
17
18
-
- Change the `syntax` attribute to indicate the syntax (or syntaxes) that the linter lints.
18
+
- Change the default `'selector'`to include the scopes you want the linter to lint.
19
19
20
20
- Change the `cmd` attribute to include the executable and arguments you want to include on every run. Or if you are going to implement a `cmd <cmd-method>` method, set the attribute to `None` and set the `executable` attribute to the name of the linter executable.
21
21
22
22
- Change the `regex` attribute to correctly capture the error output from the linter.
23
23
24
24
- Change the `multiline` attribute to `True` if the regex parses multiline error messages.
25
25
26
+
Other, optional, attributes include:
27
+
26
28
- Determine the minimum/maximum versions of the linter executable that will work with your plugin and change the `version_args`, `version_re` and `version_requirement` attributes accordingly.
27
29
28
30
- If the linter executable does not accept input via `stdin`, set the `tempfile_suffix` attribute to the filename suffix of the temp files that will be created.
29
31
30
-
These are the minimum requirements to make a linter plugin functional. However, depending on the features of the linter executable, you may need to configure other class attributes.
31
-
32
32
- If the linter outputs errors only on `stderr` or `stdout`, set `error_stream` to `util.STREAM_STDERR` or `util.STREAM_STDOUT` respectively.
33
33
34
34
- If you wish to support embedded syntaxes, set the `selectors` attribute accordingly.
35
35
36
36
- If the linter subclasses from `PythonLinter`, remove the `module` attribute if you do not plan to use the linter’s python API. If you do, you will need to implement the `check` method.
37
37
38
-
You should remove attributes that you do not change, as their values will be provided by the superclass.
38
+
You should remove attributes that you do not change, as their values will be provided by the superclass. More information can be found in the [docs](https://github.com/SublimeLinter/SublimeLinter/blob/master/docs/linter_attributes.rst).
0 commit comments