src/tests/gui_pylintrc
author John Rice <john.rice@sun.com>
Wed, 03 Sep 2008 14:16:19 +0100
changeset 500 e3ac4c2d99a1
parent 483 2110c070804c
child 578 da257532b3f2
permissions -rw-r--r--
1723 startup performance 3087 shutdown too long 1915 category ordering

#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END

# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.

# This file is used to control pylint when checking the packagemanager
# GUI python source
#
# To run:
#
# $ cd .../gate/src
# $ pylint --rcfile=gui_pylintrc packagemanager.py > pylint-results.txt
#
# For more information on pylint, see: http://www.logilab.org/857
# In particular:
#
#  * Pylint tutorial   - http://www.logilab.org/card/pylint_tutorial
#  * Pylint User Guide - http://www.logilab.org/card/pylint_manual
#  * Pylint Features   - http://www.logilab.org/card/pylintfeatures
#
# The goal is to try to get a score of 10.00 for this Python code.
# Currently this will require quite a bit of useful refactoring. 
# Until that is done, we fudge the results by making various 
# adjustments to the default pylint values. This will remove their 
# warnings from the output generated by pylint.
#

[MASTER]

[MESSAGES CONTROL]

# Disable the message(s) with the given id(s).
#
# C0111: Missing Docstring
# W0511: Used when a warning note as FIXME or XXX is detected.
# W0613: Unused argument
#
# W0212: Access to a protected member                            (fix)
# Some duplicated code is giving us a number of protected access warnings that we will get rid of when this code duplication is removed
# W0612: Unused variable                                         (fix)
# Some of the access methods we use in return a number of elements of which we only need to use one

disable-msg=C0111,W0511,W0613


[REPORTS]

[BASIC]

# Required attributes for module, separated by a comma
required-attributes=

# Regular expression which should only match functions or classes name which do
# not require a docstring
no-docstring-rgx=__.*__

# Regular expression which should only match correct module names
module-rgx=(([a-z_][a-zA-Z0-9_-]*)|([A-Z][a-zA-Z0-9_-]+))$

# Regular expression which should only match correct module level names
const-rgx=(([a-zA-Z_][a-zA-Z1-9_]*)|(__.*__))$

# Regular expression which should only match correct class names
class-rgx=[A-Z_][a-zA-Z0-9]+$

# Regular expression which should only match correct function names
function-rgx=[a-z_][a-zA-Z0-9_]*$

# Regular expression which should only match correct method names
method-rgx=[a-z_][a-zA-Z0-9_]*$

# Regular expression which should only match correct instance attribute names
attr-rgx=[a-z_][a-zA-Z0-9_]*$

# Regular expression which should only match correct argument names
argument-rgx=[a-z_][a-zA-Z0-9_]*$

# Regular expression which should only match correct variable names
variable-rgx=[a-z_][a-zA-Z0-9_]*$

# Regular expression which should only match correct list comprehension /
# generator expression variable names
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$

# Good variable names which should always be accepted, separated by a comma
good-names=N_
#good-names=i,j,k,ex,Run,_,Q_

[TYPECHECK]

[VARIABLES]

[CLASSES]

[DESIGN]

# Maximum number of arguments for function / method
max-args=7

# Maximum number of locals for function / method body
max-locals=50

# Maximum number of return / yield for function / method body
max-returns=6

# Maximum number of branch for function / method body
max-branchs=25

# Maximum number of statements in function / method body
max-statements=100

# Maximum number of parents for a class (see R0901).
max-parents=7

# Maximum number of attributes for a class (see R0902).
# Require large number of instance attributes as we are loading up handles to widget elements and only want to do this in init
# for performance reasons
max-attributes=80

# Minimum number of public methods for a class (see R0903).
min-public-methods=0

# Maximum number of public methods for a class (see R0904).
# Increase from 20 to 40 as we are deriving off various classes and can't reduce the number further
max-public-methods=40

[IMPORTS]

[FORMAT]

# Maximum number of characters on a single line.
#
max-line-length=90

# Maximum number of lines in a module
# Increased from 1500 as the packagemanager is doing a lot of GUI initialisation that we can't logically put anywhere else.
max-module-lines=2000

# String used as indentation unit. This is usually " " (4 spaces) or
# "\t" (1 tab).
#
indent-string='        '

[MISCELLANEOUS]

[SIMILARITIES]