[Pydev-cvs] org.python.pydev/src/org/python/pydev/builder/pylint PyLintPrefPage.java,1.6,1.7 PyLintV
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2005-01-25 16:05:24
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/builder/pylint In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22165/src/org/python/pydev/builder/pylint Modified Files: PyLintPrefPage.java PyLintVisitor.java Log Message: Version 2.4 support (kind of) Index: PyLintVisitor.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/builder/pylint/PyLintVisitor.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** PyLintVisitor.java 20 Dec 2004 18:16:35 -0000 1.10 --- PyLintVisitor.java 25 Jan 2005 16:04:42 -0000 1.11 *************** *** 23,251 **** /** * * - * --version show program's version number and exit - * -h, --help show this help message and exit - * - * Master: - * lint Python modules using external checkers. - * --disable-all Disable all possible checkers. This option should - * precede enable-* options. - * --help-msg=<msg-id> - * Display a help message for the given message id and - * exit. This option may be a comma separated list. - * --zope Initialize Zope products before starting. - * --cache-size=<size> - * Set the cache size for astng objects. - * --generate-rcfile Generate a sample configuration file according to the - * current configuration. You can put other options before - * this one to use them in the configuration. This option - * causes the program to exit - * --ignore=<file> Add <file> (may be a directory) to the black list. It - * should be a base name, not a path. You may set this - * option multiple times. - * --persistent=<y_or_n> - * Pickle collected data for later comparisons. - * - * Reports: - * Options related to messages / statistics reporting - * --enable-msg=<msg ids> - * Enable the message with the given id. This option may be - * a comma separated list or be set multiple time. - * --disable-msg=<msg ids> - * Disable the message with the given id. This option may - * be a comma separated list or be set multiple time. - * --disable-report=<rpt ids> - * Disable the report with the given id. This option may be - * a comma separated list or be set multiple time. - * --html Use HTML as output format instead of text - * --parseable Use a parseable text output format, so your favorite - * text editor will be able to jump to the line - * corresponding to a message. - * --reports=<y_or_n> Tells wether to display a full report or only the - * messages - * --files-output=<y_or_n> - * Put messages in a separate file for each module / - * package specified on the command line instead of - * printing them on stdout. Reports (if any) will be - * written in a file name "pylint_global.[txt|html]". - * --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, warnings, statements 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). - * --comment=<y_or_n> Add a comment according to your evaluation note. This is - * used by the global evaluation report (R0004). - * --include-ids=<y_or_n> - * Include message's id in output - * - * Basic: - * checks for : - * * doc strings - * * modules / classes / functions / methods / arguments / variables name - * * number of arguments, local variables, branchs, returns and statements - * in functions, methods - * * required module attributes - * * dangerous default values as arguments - * * redefinition of function / method / class - * * uses of the global statement - * --enable-basic=<y_or_n> - * Enable / disable this checker - * --max-args=<int> Maximum number of arguments for function / method - * --max-locals=<int> Maximum number of locals for function / method body - * --max-returns=<int> - * Maximum number of return / yield for function / method - * body - * --max-branchs=<int> - * Maximum number of branch for function / method body - * --max-statements=<int> - * Maximum number of statements in function / method body - * --required-attributes=<attributes> - * Required attributes for module, separated by a comma - * --no-docstring-rgx=<regexp> - * Regular expression which should only match functions or - * classes name which do not require a docstring - * --min-name-length=<int> - * Minimal length for module / class / function / method / - * argument / variable names - * --module-rgx=<regexp> - * Regular expression which should only match correct - * module names - * --class-rgx=<regexp> - * Regular expression which should only match correct class - * names - * --function-rgx=<regexp> - * Regular expression which should only match correct - * function names - * --method-rgx=<regexp> - * Regular expression which should only match correct - * method names - * --argument-rgx=<regexp> - * Regular expression which should only match correct - * argument names - * --variable-rgx=<regexp> - * Regular expression which should only match correct - * variable names - * --good-names=<names> - * Good variable names which should always be accepted, - * separated by a comma - * --bad-names=<names> - * Bad variable names which should always be refused, - * separated by a comma - * --bad-functions=<builtin function names> - * List of builtins function names that should not be used, - * separated by a comma - * - * Classes: - * checks for : - * * methods without self as first argument - * * overriden methods signature - * * access only to existant members via self - * * attributes not defined in the __init__ method - * * supported interfaces implementation - * * unreachable code - * --enable-classes=<y_or_n> - * Enable / disable this checker - * --ignore-iface-methods=<method names> - * List of interface methods to ignore, separated by a - * comma. This is used for instance to not check methods - * defines in Zope's Interface base class. - * --ignore-mixin-members=<y_or_n> - * Tells wether missing members accessed in mixin class - * should be ignored. A mixin class is detected if its name - * ends with "mixin" (case insensitive). - * - * Exceptions: - * checks for - * * excepts without exception filter - * * string exceptions - * --enable-exceptions=<y_or_n> - * Enable / disable this checker - * - * Format: - * checks for : - * * unauthorized constructions - * * strict indentation - * * line length - * * use of <> - * --enable-format=<y_or_n> - * Enable / disable this checker - * --max-line-length=<int> - * Maximum number of characters on a single line. - * --max-module-lines=<int> - * Maximum number of lines in a module - * --indent-string=<string> - * String used as indentation unit. This is usually " " - * (4 spaces) or "\t" (1 tab). - * - * Imports: - * checks for - * * external modules dependancies - * * relative / wildcard imports - * * cyclic imports - * * uses of deprecated modules - * --enable-imports=<y_or_n> - * Enable / disable this checker - * --deprecated-modules=<modules> - * Deprecated modules which should not be used, separated - * by a comma - * - * Miscellaneous: - * checks for: - * * source code with non ascii characters but no encoding declaration (PEP - * 263) - * * warning notes in the code like FIXMEc, XXXx - * --enable-miscellaneous=<y_or_n> - * Enable / disable this checker - * --notes=<comma separated values> - * List of note tags to take in consideration, separated by - * a comma. Default to FIXMEc, XXXx, TODOo - * - * Metrics: - * does not check anything but gives some raw metrics : - * * total number of lines - * * total number of code lines - * * total number of docstring lines - * * total number of comments lines - * * total number of empty lines - * --enable-metrics=<y_or_n> - * Enable / disable this checker - * - * Variables: - * checks for - * * unused variables / imports - * * undefined variables - * * redefinition of variable from builtins or from an outer scope - * * use of variable before assigment - * --enable-variables=<y_or_n> - * Enable / disable this checker - * --init-import=<y_or_n> - * Tells wether we should check for unused import in - * __init__ files. - * - * Environment variables: - * 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 C:\Documents and - * Settings\fabioz\.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 - * None . - * * PYLINT_IMPORT - * this variable is set by pylint since some packages may want to known - * when they are imported by pylint. - * - * Output: - * Using the default text output, the message format is : - * MESSAGE_TYPE: LINE_NUM:[OBJECT:] MESSAGE - * There are 3 kind of message types : - * * (W) warning and (E) error - * these message types are used to distinguish the gravity of the detected - * problem. - * * (F) fatal - * an error occured which prevented pylint from doing further processing. * @author Fabio Zadrozny */ --- 23,28 ---- /** * + * Check lint.py for options. * * @author Fabio Zadrozny */ *************** *** 256,259 **** --- 33,37 ---- */ public static final String PYLINT_PROBLEM_MARKER = "org.python.pydev.pylintproblemmarker"; + public boolean visitResource(IResource resource, IDocument document) { try { Index: PyLintPrefPage.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/builder/pylint/PyLintPrefPage.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PyLintPrefPage.java 28 Oct 2004 17:26:12 -0000 1.6 --- PyLintPrefPage.java 25 Jan 2005 16:04:42 -0000 1.7 *************** *** 61,65 **** public PyLintPrefPage() { ! super(GRID); setPreferenceStore(PydevPlugin.getDefault().getPreferenceStore()); setDescription("Pylint"); --- 61,65 ---- public PyLintPrefPage() { ! super(FLAT); setPreferenceStore(PydevPlugin.getDefault().getPreferenceStore()); setDescription("Pylint"); *************** *** 94,102 **** addField(fileField); ! addField(new BooleanFieldEditor(USE_FATAL, "Communicate found fatal errors?", p)); ! addField(new BooleanFieldEditor(USE_ERRORS, "Communicate found errors?", p)); ! addField(new BooleanFieldEditor(USE_WARNINGS, "Communicate found warnings?", p)); ! addField(new BooleanFieldEditor(USE_CODING_STANDARD, "Communicate coding standard warnings?", p)); ! addField(new BooleanFieldEditor(USE_REFACTOR, "Communicate refactor warnings?", p)); --- 94,102 ---- addField(fileField); ! addField(new BooleanFieldEditor(USE_FATAL, "Communicate FATAL?", p)); ! addField(new BooleanFieldEditor(USE_ERRORS, "Communicate ERRORS?", p)); ! addField(new BooleanFieldEditor(USE_WARNINGS, "Communicate WARNINGS?", p)); ! addField(new BooleanFieldEditor(USE_CODING_STANDARD, "Communicate CONVENTIONS?", p)); ! addField(new BooleanFieldEditor(USE_REFACTOR, "Communicate REFACTOR?", p)); |