diff options
-rw-r--r-- | doc/features.txt | 334 | ||||
-rw-r--r-- | doc/makefile | 4 | ||||
-rw-r--r-- | examples/pylintrc | 6 | ||||
-rw-r--r-- | man/pylint.1 | 10 |
4 files changed, 177 insertions, 177 deletions
diff --git a/doc/features.txt b/doc/features.txt index a0cdd303f..eeecde6f3 100644 --- a/doc/features.txt +++ b/doc/features.txt @@ -20,7 +20,7 @@ General options :ignore: Add <file or directory> to the black list. It should be a base name, not a path. You may set this option multiple times. - Default: CSV + Default: CVS :persistent: Pickle collected data for later comparisons. Default: yes @@ -65,7 +65,7 @@ Messages control options Reports options ~~~~~~~~~~~~~~~ :output-format: - set the output format. Available formats are text, parseable, colorized, msvs + Set the output format. Available formats are text, parseable, colorized, msvs (visual studio) and html Default: text :include-ids: @@ -79,7 +79,7 @@ Reports options Default: yes :evaluation: Python expression which should return a note less than 10 (10 is the highest - note).You have access to the variables errors warning, statement which + note). You have access to the variables errors warning, statement which respectivly contain the number of errors / warnings messages and the total number of statements analyzed. This is used by the global evaluation report (R0004). @@ -107,17 +107,17 @@ Main messages Used when an inline option is either badly formatted or can't be used inside modules. :I0011: *Locally disabling %s* - Used when an inline option disable a message or a messages category. + Used when an inline option disables a message or a messages category. :I0012: *Locally enabling %s* - Used when an inline option enable a message or a messages category. + Used when an inline option enables a message or a messages category. :I0013: *Ignoring entire file* Used to inform that the file will not be checked :F0001: - Used when an error occured preventing the analyzing of a module (unable to - find it for instance). + Used when an error occured preventing the analysis of a module (unable to find + it for instance). :F0002: *%s: %s* Used when an unexpected error occured while building the ASTNG representation. - This is usually accomopagned by a traceback. Please report such errors ! + This is usually accompanied by a traceback. Please report such errors ! :F0003: *ignored builtin module %s* Used to indicate that the user asked to analyze a builtin module which has been skipped. @@ -225,7 +225,7 @@ Messages Used when a statement is endend by a semi-colon (";"), which isn't necessary (that's python, not C ;). :W0107: *Unnecessary pass statement* - Used when a "pass" statement that can be avoided is encountered. + Used when a "pass" statement that can be avoided is encountered.) :W0122: *Use of the exec statement* Used when you use the "exec" statement, to discourage its usage. That doesn't mean you can not use it ! @@ -274,24 +274,24 @@ Options When zope mode is activated, consider the acquired-members option to ignore access to some undefined attributes. :acquired-members: - List of members which usually get through zope's acquisition mecanism and + List of members which are usually get through zope's acquisition mecanism and so shouldn't trigger E0201 when accessed (need zope=yes to be considered). Default: REQUEST,acl_users,aq_parent Messages ~~~~~~~~ :E1101: *%s %r has no %r member* - Used when a variable is accessed for an nonexistent member. + Used when a variable is accessed for an unexistant member. :E1102: *%s is not callable* - Used when an object being called has been inferred to a non callable object + Used when an object being called has been infered to a non callable object :E1103: *%s %r has no %r member (but some types could not be inferred)* - Used when a variable is accessed for an nonexistent member, but astng was not + Used when a variable is accessed for an unexistant member, but astng was not able to interpret all possible types of this variable. :E1111: *Assigning to function call which doesn't return* - Used when an assigment is done on a function call but the inferred function + Used when an assigment is done on a function call but the infered function doesn't return anything. :W1111: *Assigning to function call which only returns None* - Used when an assigment is done on a function call but the inferred function + Used when an assigment is done on a function call but the infered function returns nothing but None. @@ -312,12 +312,12 @@ Options Default: _|dummy :additional-builtins: List of additional names supposed to be defined in builtins. Remember that - you should avoid defining new builtins when possible. + you should avoid to define new builtins when possible. Messages ~~~~~~~~ :E0601: *Using variable %r before assignment* - Used when a local variable is accessed before its assignment. + Used when a local variable is accessed before it's assignment. :E0602: *Undefined variable %r* Used when an undefined variable is accessed. :E0611: *No name %r in module %r* @@ -327,13 +327,13 @@ Messages variable is not defined in the module scope. :W0602: *Using global for %r but no assigment is done* Used when a variable is defined through the "global" statement but no - assignment to this variable is done. + assigment to this variable is done. :W0603: *Using the global statement* Used when you use the "global" statement to update a global variable. PyLint - just tries to discourage this usage. That doesn't mean you can not use it ! + just try to discourage this usage. That doesn't mean you can not use it ! :W0604: *Using the global statement at the module level* Used when you use the "global" statement at the module level since it has no - effect. + effect :W0611: *Unused import %s* Used when an imported module or variable is not used. :W0612: *Unused variable %r* @@ -344,97 +344,20 @@ Messages Used when an imported module or variable is not used from a 'from X import *' style import. :W0621: *Redefining name %r from outer scope (line %s)* - Used when a variable's name hides a name defined in the outer scope. + Used when a variable's name hide a name defined in the outer scope. :W0622: *Redefining built-in %r* - Used when a variable or function overrides a built-in. + Used when a variable or function override a built-in. :W0631: *Using possibly undefined loop variable %r* - Used when a loop variable (i.e. defined by a for loop or a list comprehension + Used when an loop variable (i.e. defined by a for loop or a list comprehension or a generator expression) is used outside the loop. -Newstyle checker ----------------- -checks for usage of new style capabilities on old style classes and -other new/old styles conflicts problems -* use of property, __slots__, super -* "super" usage -* raising a new style class as exception - -Messages -~~~~~~~~ -:E1001: *Use __slots__ on an old style class* - Used when an old style class use the __slots__ attribute. -:E1002: *Use super on an old style class* - Used when an old style class use the super builtin. -:E1003: *Bad first argument %r given to super class* - Used when another argument than the current class is given as first argument - of the super builtin. -:E1010: *Raising a new style class* - Used when a new style class is raised since it's not possible with python < - 2.5. -:W1001: *Use of "property" on an old style class* - Used when PyLint detect the use of the builtin "property" on an old style - class while this is relying on new style classes features -:W1010: *Exception doesn't inherit from standard "Exception" class* - Used when a custom exception class is raised but doesn't inherit from the - builtin "Exception" class. - - -Imports checker ---------------- -checks for -* external modules dependencies -* relative / wildcard imports -* cyclic imports -* uses of deprecated modules - -Options -~~~~~~~ -:deprecated-modules: - Deprecated modules which should not be used, separated by a comma - Default: regsub,string,TERMIOS,Bastion,rexec -:import-graph: - Create a graph of every (i.e. internal and external) dependencies in the - given file (report R0402 must not be disabled) -:ext-import-graph: - Create a graph of external dependencies in the given file (report R0402 must - not be disabled) -:int-import-graph: - Create a graph of internal dependencies in the given file (report R0402 must - not be disabled) - -Messages -~~~~~~~~ -:W0401: *Wildcard import %s* - Used when `from module import *` is detected. -:W0402: *Uses of a deprecated module %r* - Used a module marked as deprecated is imported. -:W0403: *Relative import %r* - Used when an import relative to the package directory is detected. -:W0404: *Reimport %r (imported line %s)* - Used when a module is reimported multiple times. -:W0406: *Module import itself* - Used when a module is importing itself. -:W0410: *__future__ import is not the first non docstring statement* - Python 2.5 and greater require __future__ import to be the first non docstring - statement in the module. -:R0401: *Cyclic import (%s)* - Used when a cyclic import between two or more modules is detected. -:F0401: *Unable to import %r (%s)* - Used when pylint has been unable to import a module. - -Reports -~~~~~~~ -:R0401: External dependencies -:R0402: Modules dependencies graph - - Classes checker --------------- checks for : * methods without self as first argument * overridden methods signature -* access only to existent members via self +* access only to existant members via self * attributes not defined in the __init__ method * supported interfaces implementation * unreachable code @@ -443,7 +366,7 @@ Options ~~~~~~~ :ignore-iface-methods: List of interface methods to ignore, separated by a comma. This is used for - instance to not check methods defined in Zope's Interface base class. + instance to not check methods defines in Zope's Interface base class. Default: isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by :defining-attr-methods: List of method names used to declare (i.e. assign) instance attributes. @@ -451,7 +374,7 @@ Options Messages ~~~~~~~~ -:E0202: *An attribute inherited from %s hides this method* +:E0202: *An attribute inherited from %s hide this method* Used when a class defines a method which is hiden by an instance attribute from an ancestor class. :E0203: *Access to member %r before its definition line %s* @@ -460,14 +383,14 @@ Messages Used when a method which should have the bound instance as first argument has no argument defined. :E0213: *Method should have "self" as first argument* - Used when a method has an attribute other than "self" as first argument. - This is considered an error since this is a soooo common convention that - you shouldn't break it! + Used when a method has an attribute different the "self" as first argument. + This is considered as an error since this is a soooo common convention that + you should'nt break it! :E0221: *Interface resolved to %s is not a class* Used when a class claims to implement an interface which is not a class. :E0222: *Missing method %r from %s interface* Used when a method declared in an interface is missing from a class - implementing this interface. + implementing this interface :W0201: *Attribute %r defined outside __init__* Used when an instance attribute is defined outside the __init__ method. :W0211: *Static method with %r as first argument* @@ -500,13 +423,13 @@ Messages Used when a class method has an attribute different than "cls" as first argument, to easily differentiate them from regular instance methods. :C0203: *Metaclass method should have "mcs" as first argument* - Used when a metaclass method has an attribute different than "mcs" as first + Used when a metaclass method has an attribute different the "mcs" as first argument. :F0202: *Unable to check methods signature (%s / %s)* Used when PyLint has been unable to check methods signature compatibility for - an unexpected reason. Please report this kind if you don't make sense of it. + an unexpected raison. Please report this kind if you don't make sense of it. :F0220: *failed to resolve interfaces implemented by %s (%s)* - Used when PyLint has failed to find interfaces implemented by a class + Used when a PyLint as failed to find interfaces implemented by a class Design checker @@ -527,7 +450,7 @@ Options Maximum number of return / yield for function / method body Default: 6 :max-branchs: - Maximum number of branches for function / method body + Maximum number of branch for function / method body Default: 12 :max-statements: Maximum number of statements in function / method body @@ -559,7 +482,7 @@ Messages Used when class has too many public methods, try to reduce this to get a more simple (and so easier to use) class. :R0911: *Too many return statements (%s/%s)* - Used when a function or method has too many return statements, making it hard + Used when a function or method has too many return statement, making it hard to follow. :R0912: *Too many branches (%s/%s)* Used when a function or method has too many branches, making it hard to @@ -579,6 +502,83 @@ Messages Used when an interface class is not implemented anywhere. +Imports checker +--------------- +checks for +* external modules dependencies +* relative / wildcard imports +* cyclic imports +* uses of deprecated modules + +Options +~~~~~~~ +:deprecated-modules: + Deprecated modules which should not be used, separated by a comma + Default: regsub,string,TERMIOS,Bastion,rexec +:import-graph: + Create a graph of every (i.e. internal and external) dependencies in the + given file (report R0402 must not be disabled) +:ext-import-graph: + Create a graph of external dependencies in the given file (report R0402 must + not be disabled) +:int-import-graph: + Create a graph of internal dependencies in the given file (report R0402 must + not be disabled) + +Messages +~~~~~~~~ +:W0401: *Wildcard import %s* + Used when `from module import *` is detected. +:W0402: *Uses of a deprecated module %r* + Used a module marked as deprecated is imported. +:W0403: *Relative import %r* + Used when an import relative to the package directory is detected. +:W0404: *Reimport %r (imported line %s)* + Used when a module is reimported multiple times. +:W0406: *Module import itself* + Used when a module is importing itself. +:W0410: *__future__ import is not the first non docstring statement* + Python 2.5 and greater require __future__ import to be the first non docstring + statement in the module. +:R0401: *Cyclic import (%s)* + Used when a cyclic import between two or more modules is detected. +:F0401: *Unable to import %r (%s)* + Used when pylint has been unable to import a module. + +Reports +~~~~~~~ +:R0401: External dependencies +:R0402: Modules dependencies graph + + +Newstyle checker +---------------- +checks for usage of new style capabilities on old style classes and +other new/old styles conflicts problems +* use of property, __slots__, super +* "super" usage +* raising a new style class as exception + +Messages +~~~~~~~~ +:E1001: *Use __slots__ on an old style class* + Used when an old style class use the __slots__ attribute. +:E1002: *Use super on an old style class* + Used when an old style class use the super builtin. +:E1003: *Bad first argument %r given to super class* + Used when another argument than the current class is given as first argument + of the super builtin. +:E1010: *Raising a new style class* + Used when a new style class is raised since it's not possible with python < + 2.5. +:W1001: *Use of "property" on an old style class* + Used when PyLint detect the use of the builtin "property" on an old style + class while this is relying on new style classes features +:W1010: *Exception doesn't inherit from standard "Exception" class* + Used when a custom exception class is raised but doesn't inherit from the + builtin "Exception" class. + + Exceptions checker ------------------ checks for @@ -608,6 +608,61 @@ Messages value which can't be used as an exception. +Format checker +-------------- +checks for : +* unauthorized constructions +* strict indentation +* line length +* use of <> instead of != + +Options +~~~~~~~ +:max-line-length: + Maximum number of characters on a single line. + Default: 80 +:max-module-lines: + Maximum number of lines in a module + Default: 1000 +:indent-string: + String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 + tab). + Default: ' ' + +Messages +~~~~~~~~ +:W0311: *Bad indentation. Found %s %s, expected %s* + Used when an unexpected number of indentation's tabulations or spaces has been + found. +:W0312: *Found indentation with %ss instead of %ss* + Used when there are some mixed tabs and spaces in a module. +:W0331: *Use of the <> operator* + Used when the deprecated "<>" operator is used instead of "!=". +:W0332: *Use l as long integer identifier* + Used when a lower case "l" is used to mark a long integer. You should use a + upper case "L" since the letter "l" looks too much like the digit "1" +:W0333: *Use of the `` operator* + Used when the deprecated "``" (backtick) operator is used instead of the str() + function. +:C0301: *Line too long (%s/%s)* + Used when a line is longer than a given number of characters. +:C0302: *Too many lines in module (%s)* + Used when a module has too much lines, reducing its readibility. +:C0321: *More than one statement on a single line* + Used when more than on statement are found on the same line. +:C0322: *Operator not preceded by a space* + Used when one of the following operator (!= | <= | == | >= | < | > | = | \+= | + -= | \*= | /= | %) is not preceded by a space. +:C0323: *Operator not followed by a space* + Used when one of the following operator (!= | <= | == | >= | < | > | = | \+= | + -= | \*= | /= | %) is not followed by a space. +:C0324: *Comma not followed by a space* + Used when a comma (",") is not followed by a space. +:F0321: *Format detection error in %r* + Used when an unexpected error occured in bad format detection.Please report + the error if it occurs. + + Miscellaneous checker --------------------- checks for: @@ -678,58 +733,3 @@ Reports :R0801: Duplication -Format checker --------------- -checks for : -* unauthorized constructions -* strict indentation -* line length -* use of <> instead of != - -Options -~~~~~~~ -:max-line-length: - Maximum number of characters on a single line. - Default: 80 -:max-module-lines: - Maximum number of lines in a module. - Default: 1000 -:indent-string: - String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 - tab). - Default: ' ' - -Messages -~~~~~~~~ -:W0311: *Bad indentation. Found %s %s, expected %s* - Used when an unexpected number of indentation's tabulations or spaces has been - found. -:W0312: *Found indentation with %ss instead of %ss* - Used when there are some mixed tabs and spaces in a module. -:W0331: *Use of the <> operator* - Used when the deprecated "<>" operator is used instead of "!=". -:W0332: *Use l as long integer identifier* - Used when a lower case "l" is used to mark a long integer. You should use a - upper case "L" since the letter "l" looks too much like the digit "1" -:W0333: *Use of the `` operator* - Used when the deprecated "``" (backtick) operator is used instead of the str() - function. -:C0301: *Line too long (%s/%s)* - Used when a line is longer than a given number of characters. -:C0302: *Too many lines in module (%s)* - Used when a module has too much lines, reducing its readibility. -:C0321: *More than one statement on a single line* - Used when more than on statement are found on the same line. -:C0322: *Operator not preceded by a space* - Used when one of the following operator (!= | <= | == | >= | < | > | = | \+= | - -= | \*= | /= | %) is not preceded by a space. -:C0323: *Operator not followed by a space* - Used when one of the following operator (!= | <= | == | >= | < | > | = | \+= | - -= | \*= | /= | %) is not followed by a space. -:C0324: *Comma not followed by a space* - Used when a comma (",") is not followed by a space. -:F0321: *Format detection error in %r* - Used when an unexpected error occured in bad format detection.Please report - the error if it occurs. - - diff --git a/doc/makefile b/doc/makefile index cf9902303..3b83f6f8e 100644 --- a/doc/makefile +++ b/doc/makefile @@ -4,7 +4,7 @@ MKHTML_OPT=--doctype article --param toc.section.depth=1 --target html --stylesh SRC=. -all: manual.html quickstart.html features.html FAQ.html examples man +all: manual.html quickstart.html features.html FAQ.html beginner_pylint_tutorial.html examples man FAQ.html: ${SRC}/FAQ.txt ${MKHTML} ${MKHTML_OPT} ${SRC}/FAQ.txt @@ -12,7 +12,7 @@ FAQ.html: ${SRC}/FAQ.txt quickstart.html: ${SRC}/quickstart.txt ${MKHTML} ${MKHTML_OPT} ${SRC}/quickstart.txt -manual.html: ${SRC}/manual.txt +manual.html: ${SRC}/manual.txt ${SRC}/FAQ.txt ${MKHTML} ${MKHTML_OPT} ${SRC}/manual.txt beginner_pylint_tutorial.html: ${SRC}/beginner_pylint_tutorial.txt diff --git a/examples/pylintrc b/examples/pylintrc index 56b079125..f674e19e4 100644 --- a/examples/pylintrc +++ b/examples/pylintrc @@ -1,6 +1,6 @@ # lint Python modules using external checkers. # -# This is the main checker controling the other ones and the reports +# This is the main checker controlling the other ones and the reports # generation. It is itself both a raw checker and an astng checker in order # to: # * handle message activation / deactivation at the module level @@ -58,7 +58,7 @@ load-plugins= [REPORTS] -# set the output format. Available formats are text, parseable, colorized, msvs +# Set the output format. Available formats are text, parseable, colorized, msvs # (visual studio) and html output-format=text @@ -74,7 +74,7 @@ files-output=no reports=yes # Python expression which should return a note less than 10 (10 is the highest -# note).You have access to the variables errors warning, statement which +# note). You have access to the variables errors warning, statement which # respectivly contain the number of errors / warnings messages and the total # number of statements analyzed. This is used by the global evaluation report # (R0004). diff --git a/man/pylint.1 b/man/pylint.1 index 80ff28a67..1e58bc5de 100644 --- a/man/pylint.1 +++ b/man/pylint.1 @@ -1,4 +1,4 @@ -.TH pylint 1 "2008-1-14" pylint +.TH pylint 1 "2008-2-7" pylint .SH NAME .B pylint \- python code static checker @@ -78,7 +78,7 @@ Disable the message(s) with the given id(s). .SH REPORTS .IP "--output-format=<format>, -f <format>" -set the output format. Available formats are text, parseable, colorized, msvs (visual studio) and html [current: %default] +Set the output format. Available formats are text, parseable, colorized, msvs (visual studio) and html [current: %default] .IP "--include-ids=<y_or_n>, -i <y_or_n>" Include message's id in output [current: %default] .IP "--files-output=<y_or_n>" @@ -86,7 +86,7 @@ Put messages in a separate file for each module / package specified on the comma .IP "--reports=<y_or_n>, -r <y_or_n>" Tells wether to display a full report or only the messages [current: %default] .IP "--evaluation=<python_expression>" -Python expression which should return a note less than 10 (10 is the highest note).You have access to the variables errors warning, statement which respectivly contain the number of errors / warnings messages and the total number of statements analyzed. This is used by the global evaluation report (R0004). [current: %default] +Python expression which should return a note less than 10 (10 is the highest note). You have access to the variables errors warning, statement which respectivly contain the number of errors / warnings messages and the total number of statements analyzed. This is used by the global evaluation report (R0004). [current: %default] .IP "--comment=<y_or_n>" Add a comment according to your evaluation note. This is used by the global evaluation report (R0004). [current: %default] .IP "--enable-report=<rpt ids>" @@ -204,7 +204,7 @@ The following environment variables are used : * PYLINTHOME path to the directory where data of persistent run will be stored. If not found, it defaults to ~/.pylint.d/ or .pylint.d (in the current working -directory) . The current PYLINTHOME is /home/syt/.pylint.d. +directory) . The current PYLINTHOME is /home/syt/.pylint.d. * PYLINTRC path to the configuration file. If not found, it will use the first existant file in ~/.pylintrc, /etc/pylintrc. The current PYLINTRC is @@ -218,7 +218,7 @@ There are 5 kind of message types : * (C) convention, for programming standard violation * (R) refactor, for bad code smell * (W) warning, for python specific problems - * (E) error, for much probably bugs in the code + * (E) error, for probable bugs in the code * (F) fatal, if an error occured which prevented pylint from doing further processing. .SH SEE ALSO |