~ubuntu-branches/ubuntu/vivid/pylint/vivid-proposed

« back to all changes in this revision

Viewing changes to doc/features.txt

  • Committer: Bazaar Package Importer
  • Author(s): Sandro Tosi
  • Date: 2009-12-19 21:38:49 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20091219213849-kcax3214c3mmucox
Tags: 0.19.0-1
* New upstream release
* debian/pylint.docs
  - removed 'TODO', no more shipped
* debian/copyright
  - updated copyright information, also adding new files with different info
* debian/{rules, TODO}
  - run tests at build-time
* debian/pylint.postrm
  - use 'set -e' instead of calling shell with '-e'

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
PyLint features
2
2
===============
3
3
 
4
 
.. generated by pylint --list-msgs
 
4
.. generated by pylint --full-documentation
5
5
 
6
6
.. contents::
7
7
 
79
79
  command line instead of printing them on stdout. Reports (if any) will be
80
80
  written in a file name "pylint_global.[txt|html]".
81
81
:reports:
82
 
  Tells wether to display a full report or only the messages
 
82
  Tells whether to display a full report or only the messages
83
83
 
84
84
  Default: ``yes``
85
85
:evaluation:
86
86
  Python expression which should return a note less than 10 (10 is the highest
87
87
  note). You have access to the variables errors warning, statement which
88
 
  respectivly contain the number of errors / warnings messages and the total
 
88
  respectively contain the number of errors / warnings messages and the total
89
89
  number of statements analyzed. This is used by the global evaluation report
90
90
  (R0004).
91
91
 
119
119
:I0013: *Ignoring entire file*
120
120
  Used to inform that the file will not be checked
121
121
:F0001:
122
 
  Used when an error occured preventing the analysis of a module (unable to find
 
122
  Used when an error occurred preventing the analysis of a module (unable to find
123
123
  it for instance).
124
124
:F0002: *%s: %s*
125
 
  Used when an unexpected error occured while building the ASTNG representation.
 
125
  Used when an unexpected error occurred while building the ASTNG representation.
126
126
  This is usually accompanied by a traceback. Please report such errors !
127
127
:F0003: *ignored builtin module %s*
128
128
  Used to indicate that the user asked to analyze a builtin module which has
129
129
  been skipped.
130
 
:F0004: *unexpected infered value %s*
131
 
  Used to indicate that some value of an unexpected type has been infered.
 
130
:F0004: *unexpected inferred value %s*
 
131
  Used to indicate that some value of an unexpected type has been inferred.
132
132
 
133
133
Main reports
134
134
~~~~~~~~~~~~
144
144
* unused variables / imports
145
145
* undefined variables
146
146
* redefinition of variable from builtins or from an outer scope
147
 
* use of variable before assigment
 
147
* use of variable before assignment
148
148
 
149
149
Options
150
150
~~~~~~~
151
151
:init-import:
152
 
  Tells wether we should check for unused import in __init__ files.
 
152
  Tells whether we should check for unused import in __init__ files.
153
153
:dummy-variables-rgx:
154
154
  A regular expression matching names used for dummy variables (i.e. not used).
155
155
 
169
169
:W0601: *Global variable %r undefined at the module level*
170
170
  Used when a variable is defined through the "global" statement but the
171
171
  variable is not defined in the module scope.
172
 
:W0602: *Using global for %r but no assigment is done*
 
172
:W0602: *Using global for %r but no assignment is done*
173
173
  Used when a variable is defined through the "global" statement but no
174
 
  assigment to this variable is done.
 
174
  assignment to this variable is done.
175
175
:W0603: *Using the global statement*
176
176
  Used when you use the "global" statement to update a global variable. PyLint
177
177
  just try to discourage this usage. That doesn't mean you can not use it !
201
201
checks for :
202
202
* doc strings
203
203
* modules / classes / functions / methods / arguments / variables name
204
 
* number of arguments, local variables, branchs, returns and statements in
 
204
* number of arguments, local variables, branches, returns and statements in
205
205
functions, methods
206
206
* required module attributes
207
207
* dangerous default values as arguments
299
299
  disable it if you're using those strings as documentation, instead of
300
300
  comments.
301
301
:W0106: *Unnecessary semicolon*
302
 
  Used when a statement is endend by a semi-colon (";"), which isn't necessary
 
302
  Used when a statement is ended by a semi-colon (";"), which isn't necessary
303
303
  (that's python, not C ;).
304
304
:W0107: *Unnecessary pass statement*
305
305
  Used when a "pass" statement that can be avoided is encountered.)
340
340
Options
341
341
~~~~~~~
342
342
:ignore-mixin-members:
343
 
  Tells wether missing members accessed in mixin class should be ignored. A
 
343
  Tells whether missing members accessed in mixin class should be ignored. A
344
344
  mixin class is detected if its name ends with "mixin" (case insensitive).
345
345
 
346
346
  Default: ``yes``
347
347
:ignored-classes:
348
348
  List of classes names for which member attributes should not be checked
349
 
  (useful for classes with attributes dynamicaly set).
 
349
  (useful for classes with attributes dynamically set).
350
350
 
351
351
  Default: ``SQLObject``
352
352
:zope:
361
361
Messages
362
362
~~~~~~~~
363
363
:E1101: *%s %r has no %r member*
364
 
  Used when a variable is accessed for an unexistant member.
 
364
  Used when a variable is accessed for an unexistent member.
365
365
:E1102: *%s is not callable*
366
 
  Used when an object being called has been infered to a non callable object
 
366
  Used when an object being called has been inferred to a non callable object
367
367
:E1103: *%s %r has no %r member (but some types could not be inferred)*
368
 
  Used when a variable is accessed for an unexistant member, but astng was not
 
368
  Used when a variable is accessed for an unexistent member, but astng was not
369
369
  able to interpret all possible types of this variable.
370
370
:E1111: *Assigning to function call which doesn't return*
371
 
  Used when an assigment is done on a function call but the infered function
 
371
  Used when an assignment is done on a function call but the inferred function
372
372
  doesn't return anything.
373
373
:W1111: *Assigning to function call which only returns None*
374
 
  Used when an assigment is done on a function call but the infered function
 
374
  Used when an assignment is done on a function call but the inferred function
375
375
  returns nothing but None.
376
376
 
377
377
 
430
430
checks for :
431
431
* methods without self as first argument
432
432
* overridden methods signature
433
 
* access only to existant members via self
 
433
* access only to existent members via self
434
434
* attributes not defined in the __init__ method
435
435
* supported interfaces implementation
436
436
* unreachable code
450
450
Messages
451
451
~~~~~~~~
452
452
:E0202: *An attribute inherited from %s hide this method*
453
 
  Used when a class defines a method which is hiden by an instance attribute
 
453
  Used when a class defines a method which is hidden by an instance attribute
454
454
  from an ancestor class.
455
455
:E0203: *Access to member %r before its definition line %s*
456
456
  Used when an instance member is accessed before it's actually assigned.
459
459
  no argument defined.
460
460
:E0213: *Method should have "self" as first argument*
461
461
  Used when a method has an attribute different the "self" as first argument.
462
 
  This is considered as an error since this is a soooo common convention that
463
 
  you should'nt break it!
 
462
  This is considered as an error since this is a so common convention that
 
463
  you shouldn't break it!
464
464
:E0221: *Interface resolved to %s is not a class*
465
465
  Used when a class claims to implement an interface which is not a class.
466
466
:E0222: *Missing method %r from %s interface*
481
481
  Used when a method signature is different than in the implemented interface or
482
482
  in an overridden method.
483
483
:W0223: *Method %r is abstract in class %r but is not overridden*
484
 
  Used when an abstract method (ie raise NotImplementedError) is not overridden
 
484
  Used when an abstract method (i.e. raise NotImplementedError) is not overridden
485
485
  in concrete class.
486
486
:W0231: *__init__ method from base class %r is not called*
487
487
  Used when an ancestor class method has an __init__ method which is not called
502
502
  argument.
503
503
:F0202: *Unable to check methods signature (%s / %s)*
504
504
  Used when PyLint has been unable to check methods signature compatibility for
505
 
  an unexpected raison. Please report this kind if you don't make sense of it.
 
505
  an unexpected reason. Please report this kind if you don't make sense of it.
506
506
:F0220: *failed to resolve interfaces implemented by %s (%s)*
507
507
  Used when a PyLint as failed to find interfaces implemented by a class
508
508
 
714
714
:C0301: *Line too long (%s/%s)*
715
715
  Used when a line is longer than a given number of characters.
716
716
:C0302: *Too many lines in module (%s)*
717
 
  Used when a module has too much lines, reducing its readibility.
 
717
  Used when a module has too much lines, reducing its readability.
718
718
:C0321: *More than one statement on a single line*
719
719
  Used when more than on statement are found on the same line.
720
720
:C0322: *Operator not preceded by a space*
726
726
:C0324: *Comma not followed by a space*
727
727
  Used when a comma (",") is not followed by a space.
728
728
:F0321: *Format detection error in %r*
729
 
  Used when an unexpected error occured in bad format detection.Please report
 
729
  Used when an unexpected error occurred in bad format detection.Please report
730
730
  the error if it occurs.
731
731
 
732
732