Skip to content

Commit

Permalink
coala/docs: Add position number convention
Browse files Browse the repository at this point in the history
Added a note in Writing_Native_Bears.rst and a reminder
for developers in Writing_Linter_Bears.rst files.

Fixes coala#5297
  • Loading branch information
bharatpurohit97 committed Dec 2, 2018
1 parent 0636e9b commit 0c7bbd1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/Developers/Writing_Linter_Bears.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ that is printed out.
For the exact list of named groups ``@linter`` recognizes, see the `API
documentation <https://api.coala.io/en/latest/>`__.

Pylint uses 0-based column convention and 1-based line convention.
We need to map linter's convention to coala's, please refer to
`Normalize line or Column convention <https://coala-api.netlify.com/developers/
writing_linter_bears#normalize-line-or-column-numbers>`__.

Please refer to `Python3 re module <https://docs.python.org/3/library/re.html>`_
and `Dive into python <http://www.diveintopython3.net/regular-expressions.html>`_
for information about regular expressions.
Expand Down
3 changes: 3 additions & 0 deletions docs/Developers/Writing_Native_Bears.rst
Original file line number Diff line number Diff line change
Expand Up @@ -598,4 +598,7 @@ For example, let's make an aspect bear named SpellingCheckBear.
aspect=DictionarySpelling('py'),
)
.. note::
Coala uses 1-based line & column convention, i.e. the first line and first column are 1. However, some linter use 0-based convention. For example ``pylint`` uses 1-based line convention and 0-based column convention. We need to map these conventions, please refer to `Normalize line or Column convention <https://coala-api.netlify.com/developers/writing_linter_bears#normalize-line-or-column-numbers>`__.

.. _main tutorial: https://docs.coala.io/en/latest/Users/Tutorial.html

0 comments on commit 0c7bbd1

Please sign in to comment.