Skip to content

Commit 3773b82

Browse files
authored
Update HOWTO
- Avoid setting `executable` - Avoid setting version stuff bc it is somewhat deprecated. It doesn't work as expected. - Do not set `selectors` bc it is deprecated - Do not implement `check` bc it never gets called
1 parent 27c337b commit 3773b82

1 file changed

Lines changed: 7 additions & 13 deletions

File tree

HOWTO.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Creating a Linter Plugin
22
========================
33

4-
. Fork this repo to bootstrap your new linter.
5-
. Clone it into Packages.
6-
. Change a linter.py.
7-
. Update the README and replace `__linter__` placeholders.
8-
. Update messages/install.txt and replace `__linter__` placeholders.
9-
. Open a PR in our [package_control repo](https://github.com/SublimeLinter/package_control_channel) to make it available to others.
4+
- Fork this repo to bootstrap your new linter.
5+
- Clone it into Packages.
6+
- Change a linter.py.
7+
- Update the README and replace `__linter__` placeholders.
8+
- Update messages/install.txt and replace `__linter__` placeholders.
9+
- Open a PR in our [package_control repo](https://github.com/SublimeLinter/package_control_channel) to make it available to others.
1010

1111
Additional documentation can be found at [sublimelinter.com](http://sublimelinter.com).
1212

@@ -17,22 +17,16 @@ Template linter plugins are created with almost all of the Linter class attribut
1717

1818
- Change the default `'selector'` to include the scopes you want the linter to lint.
1919

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.
20+
- Change the `cmd` attribute to include the executable and arguments you want to include on *every* run. Usually this should be a tuple like `('linter', '-fooarg', '-etc', '-')`. You can also make `cmd` a method (or callable in python speak) which returns such a tuple.
2121

2222
- Change the `regex` attribute to correctly capture the error output from the linter.
2323

2424
- Change the `multiline` attribute to `True` if the regex parses multiline error messages.
2525

2626
Other, optional, attributes include:
2727

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.
29-
3028
- 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.
3129

3230
- If the linter outputs errors only on `stderr` or `stdout`, set `error_stream` to `util.STREAM_STDERR` or `util.STREAM_STDOUT` respectively.
3331

34-
- If you wish to support embedded syntaxes, set the `selectors` attribute accordingly.
35-
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-
3832
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

Comments
 (0)