summaryrefslogtreecommitdiff
path: root/pylint/utils.py
Commit message (Collapse)AuthorAgeFilesLines
* Chore - Move utils.py into its own packagePierre Sassoulas2019-03-091-1510/+0
|
* Refactor - Rename _messages to _messages_definitionsPierre Sassoulas2018-12-181-7/+7
|
* Refactor - Made the error message predictablePierre Sassoulas2018-12-181-2/+6
| | | | | | When refactoring MsgStore we don't want the test to break if two conflicting symbol or msgid are inverted. So we sort them, in order for the error message to stay stable.
* Refactor - get_messages -> get_messages_from_checkerPierre Sassoulas2018-12-181-6/+6
|
* Refactor - Consistent function and variable namePierre Sassoulas2018-12-181-33/+37
| | | | | | | We return a list of message definitions so we must rename get_message_definition to get_message_definitions. Resulting variables are now named message_definitions most of the time in order to improve readability. (It was often named "msgs" or worst "symbol")
* Refactor - get_message_definition returning a listPierre Sassoulas2018-12-181-33/+59
| | | | Of MessageDefinition instead of a MessageDefinition.
* ``pylint`` is less eager to consume the whole line for pragmasClaudiu Popa2018-09-291-2/+2
| | | | | | | | The regex was adapted so that we either stop at one of `;` or `#`, or at the end of the line. This should improve the situation a little bit when dealing with the flags of other linters. Close #2485
* Correct fallback when the lines out of the parse trees are in ↵Claudiu Popa2018-09-181-1/+16
| | | | | | | | | raw_module_msgs_state `_raw_module_msgs_state` holds a mapping of messages to lines and their status, enabled or disabled. As such, the correct solution is to check if any of those lines matches the current line that's out of the AST, as well as to check if it's disabled or enabled, since it can vary depending on the pragma that was used.
* Reformat the code with blackClaudiu Popa2018-09-171-197/+303
|
* The ``locally-enabled`` check is gone.Claudiu Popa2018-08-241-4/+1
| | | | Close #2442
* disable some type checking and annotate simple onessolanki2018-08-211-1/+1
|
* fix typos in docstringssolanki2018-08-051-2/+2
|
* Make generated rst section names uniqueBryce Guinta2018-08-011-7/+8
| | | | This prevents autolabeling issues where these sections can't be linked to properly
* Fix rst italics of generated pylint helpBryce Guinta2018-08-011-1/+2
| | | | rst expects no space before the '*' end marker
* Fix not being able to disable certain messages on the last line (#2342)Bryce Guinta2018-07-241-1/+2
| | | | | | Allow messages to be disabled that occur in ``file_state._msgs_state`` after the end of the ast (but not of the tokens) Close #2278
* Update copyright noticesClaudiu Popa2018-07-151-2/+9
|
* Add new checker useless-object-inheritance.ssolanki2018-06-201-7/+7
| | | | Close #2177
* Fixed incorrect line number for line-too-long on comment at end of module ↵hippo912018-06-021-0/+12
| | | | | | | | | | (#2164) * Add of get_effective_max_line_number in FileState class + calling it in is_message_enabled * Add of unittest that should not raise any line-too-long message even for a commended line at the end of module * Add of ChangeLog and whatsnew entries
* Remove six package usages. (#2151)Sushobhit2018-05-271-17/+14
|
* Remove extraneous variablesClaudiu Popa2018-05-231-3/+0
|
* Refactor - MessagesStore.check_message_id(msgid)Pierre Sassoulas2018-05-101-16/+18
| | | | Closes #2071
* Fix - Take reviews by PCManticore into accountPierre Sassoulas2018-05-101-39/+48
| | | | See #2075
* Fix - Remove f-string for python 3.4 and 3.5 compatibilityPierre Sassoulas2018-05-101-8/+16
| | | | And adapt line lenght in order to not add convention message.
* Style - Readability changes in MessagesStorePierre Sassoulas2018-05-101-36/+51
| | | | | | | Use of f-strings in Python 3. Updated the docstrings with spinx syntax. Rename variable to be clearer and use @staticmethoc when possible. Following review of #2036
* Refactor - Better error message for inconsistent checkerPierre Sassoulas2018-05-101-2/+5
|
* Refactor - Better error message for duplicated msgid or symbolPierre Sassoulas2018-05-101-38/+121
| | | | | | | | Create a function to get message definitions list from a checker. Create a function for checking checker consistency Create a function in order to register a MessageDefinition Corrected following the review of pull-request #2036 by Ashley Whetter and PCManticore.
* Finally we're lint cleanClaudiu Popa2018-05-091-1/+1
|
* Drop the encoding parameter from the format_section functionClaudiu Popa2018-05-091-10/+1
|
* Drop unused argumentClaudiu Popa2018-05-091-3/+2
|
* Make sure we operate on stringsClaudiu Popa2018-05-091-1/+1
|
* Remove a couple of sys.version checks that aren't needed any longer on Python 3Claudiu Popa2018-05-091-26/+6
|
* Revert "Proposal of a fix for bug #1950"Claudiu Popa2018-04-171-13/+0
|
* Taking into accound @PCManticore's remarkshippo912018-04-151-4/+4
|
* Taking into account pylint's remarkhippo912018-04-071-4/+4
|
* Add of comment and changing the return value in case the message's line is ↵hippo912018-04-071-1/+5
| | | | after the maximum line in the ast tree
* Merge branch 'master' into bug_1950hippo912018-04-061-0/+22
|\
| * Add a new checker against using numeric ids instead of symbolic idshippo912018-03-051-0/+22
| | | | | | | | | | | | | | In pylint we have two types of checker messages, message ids, which are numeric by nature, and symbolic ids, which are in natural language. We recommend users to use the latter form, since it conveys a better meaning of what the error is. Close #1599
* | Add of get_effective_max_line_number in FileState class + calling it in ↵hippo912018-04-061-0/+9
|/ | | | is_message_enabled.
* Correctly strip the path prefix from the report paths (#1883)Reverb C2018-03-011-1/+1
| | | | Closes #1120
* Fix the wrong scope of the ``disable=`` directive after a commented line.hippo912018-02-141-1/+1
| | | | | | | For example when a ``disable=line-too-long`` directive is at the end of a long commented line, it no longer disables the emission of ``line-too-long`` message for lines that follow. Close #1742
* Enable redefined-builtinNick Drozd2018-01-041-8/+8
|
* Add ability to specify message column offset independent of node for ↵Bryce Guinta2018-01-031-4/+4
| | | | messages that rely on tokens
* Regenerate copyright noticesClaudiu Popa2017-12-151-2/+22
|
* Make the documentation build reproducibly. (#1761)Chris Lamb2017-12-111-1/+1
| | | | | | | | | | | | | | | Whilst working on the Reproducible Builds effort [0], we noticed that pylint could not be built reproducibly. This is due to the documentation generator iterating over the filesystem in a nondeterminstic order and then iterating over an internal, nondeterminstic, data structure. This was originally filed in Debian as #883913. [0] https://reproducible-builds.org/ [1] https://bugs.debian.org/883913 Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
* Adding a check for ``inconsistent-return-statements`` inside function or ↵hippo912017-09-261-0/+1
| | | | | methods. (#1641) Close #1267
* Use codecs.getreader. (#1658)Anthony Sottile2017-09-171-1/+10
| | | | | | * Use codecs.getreader. * Test decoding_stream and _decoding_readline
* Comma separated values in the configuration file appear one item per lineThomas Hisch2017-08-141-1/+8
| | | This change makes list-like output in all sections more readable (one item per line).
* Ignore patterns works on top-level files as well. Close #1384Claudiu Popa2017-07-211-0/+2
|
* Skip files or directories passed at command line when they are ignored. ↵Claudiu Popa2017-07-191-0/+2
| | | | Close #908
* Fix crash if bad encoding goes after docstring (#1443)Mikhail Fesenko2017-05-221-1/+8
|