2014-05-04 07:09:47 -04:00
|
|
|
# CONTRIBUTING
|
|
|
|
- - -
|
|
|
|
1\. [Bug reports / GitHub issues](#bugreps)
|
|
|
|
2\. [Submitting a patch](#patches)
|
|
|
|
3\. [General style notes](#generalstyle)
|
|
|
|
4\. [Syntax checker notes](#checkerstyle)
|
|
|
|
- - -
|
|
|
|
|
|
|
|
<a name="bugreps"></a>
|
|
|
|
|
|
|
|
## 1. Bug reports / GitHub issues
|
2013-04-13 10:28:11 -04:00
|
|
|
|
2014-05-04 06:58:25 -04:00
|
|
|
Please note that the preferred channel for posting bug reports is the
|
2016-03-08 00:30:14 -05:00
|
|
|
[issue tracker at GitHub][0]. Reports posted elsewhere are less likely
|
2014-05-04 06:58:25 -04:00
|
|
|
to be seen by the core team.
|
|
|
|
|
|
|
|
When reporting a bug make sure you search the existing GitHub issues
|
2016-03-08 00:30:14 -05:00
|
|
|
for the same/similar issues. If you find one, feel free to add a `+1`
|
2014-05-04 06:58:25 -04:00
|
|
|
comment with any additional information that may help us solve the
|
|
|
|
issue.
|
2013-04-13 10:28:11 -04:00
|
|
|
|
|
|
|
When creating a new issue be sure to state the following:
|
|
|
|
|
2014-05-04 06:58:25 -04:00
|
|
|
* steps to reproduce the bug;
|
|
|
|
* the version of Vim you are using (run `:ver` to find out);
|
|
|
|
* the version of syntastic you are using (see `:SyntasticInfo`).
|
|
|
|
|
|
|
|
For syntax checker bugs also state the version of the checker executable
|
2016-03-08 00:30:14 -05:00
|
|
|
that you are using. Adding debugging information is typically useful
|
2014-05-04 07:09:47 -04:00
|
|
|
too:
|
2013-04-13 10:28:11 -04:00
|
|
|
|
2014-05-04 06:58:25 -04:00
|
|
|
* open a file handled by your checker;
|
|
|
|
* set `g:syntastic_debug` to 1 or 3;
|
|
|
|
* run the checker;
|
2014-05-04 07:09:47 -04:00
|
|
|
* copy the output of `:mes`.
|
|
|
|
|
|
|
|
<a name="patches"></a>
|
2013-04-13 10:28:11 -04:00
|
|
|
|
2014-05-04 07:09:47 -04:00
|
|
|
## 2. Submitting a patch
|
2013-04-10 14:41:53 -04:00
|
|
|
|
2016-03-08 00:30:14 -05:00
|
|
|
Before you consider adding features to syntastic, _please_ spend a few minutes
|
|
|
|
(re-)reading the latest version of the [manual][1]. Syntastic is changing
|
|
|
|
rapidly at times, and it's possible that some features you want to add exist
|
|
|
|
already.
|
2014-05-04 06:58:25 -04:00
|
|
|
|
|
|
|
To submit a patch:
|
|
|
|
|
|
|
|
* fork the [repo][2] on GitHub;
|
|
|
|
* make a [topic branch][3] and start hacking;
|
|
|
|
* submit a pull request based off your topic branch.
|
2013-04-10 14:41:53 -04:00
|
|
|
|
2014-05-04 06:58:25 -04:00
|
|
|
Small, focused patches are preferred.
|
2013-04-10 14:41:53 -04:00
|
|
|
|
2014-05-04 06:58:25 -04:00
|
|
|
Large changes to the code should be discussed with the core team first.
|
|
|
|
Create an issue and explain your plan and see what we say.
|
|
|
|
|
2016-03-08 00:30:14 -05:00
|
|
|
Also, make sure to update the manual whenever applicable. Nobody can use
|
2014-05-04 06:58:25 -04:00
|
|
|
features that aren't documented.
|
2013-04-10 14:46:43 -04:00
|
|
|
|
2014-05-04 07:09:47 -04:00
|
|
|
<a name="generalstyle"></a>
|
|
|
|
|
|
|
|
## 3. General style notes
|
2013-04-10 14:41:53 -04:00
|
|
|
|
2014-05-04 06:58:25 -04:00
|
|
|
Follow the coding conventions/styles used in the syntastic core:
|
|
|
|
|
|
|
|
* use 4 space indents;
|
|
|
|
* don't use abbreviated keywords - e.g. use `endfunction`, not `endfun`
|
|
|
|
(there's always room for more fun!);
|
|
|
|
* don't use `l:` prefixes for variables unless actually required (i.e.
|
|
|
|
almost never);
|
|
|
|
* code for maintainability; we would rather a function be a couple of
|
|
|
|
lines longer and have (for example) some [explaining variables][4] to
|
|
|
|
aid readability.
|
2013-04-10 14:41:53 -04:00
|
|
|
|
2014-05-04 07:09:47 -04:00
|
|
|
<a name="checkerstyle"></a>
|
|
|
|
|
|
|
|
## 4. Syntax checker notes
|
2013-04-10 14:41:53 -04:00
|
|
|
|
2014-05-04 06:58:25 -04:00
|
|
|
Make sure to read the [guide][5] if you plan to add new syntax checkers.
|
2013-04-10 14:41:53 -04:00
|
|
|
|
2014-05-04 06:58:25 -04:00
|
|
|
Use the existing checkers as templates, rather than writing everything
|
|
|
|
from scratch.
|
2013-04-10 14:41:53 -04:00
|
|
|
|
2014-05-04 06:58:25 -04:00
|
|
|
The preferred style for error format strings is one "clause" per line.
|
|
|
|
E.g. (from the `coffee` checker):
|
|
|
|
|
|
|
|
```vim
|
|
|
|
let errorformat =
|
|
|
|
\ '%E%f:%l:%c: %trror: %m,' .
|
|
|
|
\ 'Syntax%trror: In %f\, %m on line %l,' .
|
|
|
|
\ '%EError: In %f\, Parse error on line %l: %m,' .
|
|
|
|
\ '%EError: In %f\, %m on line %l,' .
|
|
|
|
\ '%W%f(%l): lint warning: %m,' .
|
|
|
|
\ '%W%f(%l): warning: %m,' .
|
|
|
|
\ '%E%f(%l): SyntaxError: %m,' .
|
|
|
|
\ '%-Z%p^,' .
|
|
|
|
\ '%-G%.%#'
|
2013-04-10 17:14:31 -04:00
|
|
|
```
|
2014-05-04 06:58:25 -04:00
|
|
|
|
|
|
|
[0]: https://github.com/scrooloose/syntastic/issues
|
|
|
|
[1]: https://github.com/scrooloose/syntastic/blob/master/doc/syntastic.txt
|
|
|
|
[2]: https://github.com/scrooloose/syntastic
|
|
|
|
[3]: https://github.com/dchelimsky/rspec/wiki/Topic-Branches#using-topic-branches-when-contributing-patches
|
|
|
|
[4]: http://www.refactoring.com/catalog/extractVariable.html
|
|
|
|
[5]: https://github.com/scrooloose/syntastic/wiki/Syntax-Checker-Guide
|