author | Michal Pryc <Michal.Pryc@Sun.Com> |
Wed, 10 Feb 2010 13:57:55 +0000 | |
changeset 1744 | 04532a16c1ac |
parent 1722 | e6721cb76674 |
child 1761 | b2d8237ac690 |
permissions | -rw-r--r-- |
483 | 1 |
# |
2 |
# CDDL HEADER START |
|
3 |
# |
|
4 |
# The contents of this file are subject to the terms of the |
|
5 |
# Common Development and Distribution License (the "License"). |
|
6 |
# You may not use this file except in compliance with the License. |
|
7 |
# |
|
8 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
9 |
# or http://www.opensolaris.org/os/licensing. |
|
10 |
# See the License for the specific language governing permissions |
|
11 |
# and limitations under the License. |
|
12 |
# |
|
13 |
# When distributing Covered Code, include this CDDL HEADER in each |
|
14 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
15 |
# If applicable, add the following below this CDDL HEADER, with the |
|
16 |
# fields enclosed by brackets "[]" replaced with your own identifying |
|
17 |
# information: Portions Copyright [yyyy] [name of copyright owner] |
|
18 |
# |
|
19 |
# CDDL HEADER END |
|
20 |
||
21 |
# Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
|
22 |
# Use is subject to license terms. |
|
23 |
||
24 |
# This file is used to control pylint when checking the packagemanager |
|
25 |
# GUI python source |
|
26 |
# |
|
27 |
# To run: |
|
28 |
# |
|
29 |
# $ cd .../gate/src |
|
30 |
# $ pylint --rcfile=gui_pylintrc packagemanager.py > pylint-results.txt |
|
31 |
# |
|
32 |
# For more information on pylint, see: http://www.logilab.org/857 |
|
33 |
# In particular: |
|
34 |
# |
|
35 |
# * Pylint tutorial - http://www.logilab.org/card/pylint_tutorial |
|
36 |
# * Pylint User Guide - http://www.logilab.org/card/pylint_manual |
|
37 |
# * Pylint Features - http://www.logilab.org/card/pylintfeatures |
|
38 |
# |
|
39 |
# The goal is to try to get a score of 10.00 for this Python code. |
|
40 |
# Currently this will require quite a bit of useful refactoring. |
|
41 |
# Until that is done, we fudge the results by making various |
|
42 |
# adjustments to the default pylint values. This will remove their |
|
43 |
# warnings from the output generated by pylint. |
|
44 |
# |
|
45 |
||
46 |
[MASTER] |
|
47 |
||
48 |
[MESSAGES CONTROL] |
|
49 |
||
50 |
# Disable the message(s) with the given id(s). |
|
51 |
# |
|
52 |
# C0111: Missing Docstring |
|
53 |
# W0511: Used when a warning note as FIXME or XXX is detected. |
|
54 |
# W0613: Unused argument |
|
1217
1e2405e83d3a
9788 pylint errors in Package Manager and Update Manager should be fixed
Padraig O'Briain <padraig.obriain@sun.com>
parents:
928
diff
changeset
|
55 |
# W0704: Except doesn't do anything |
1e2405e83d3a
9788 pylint errors in Package Manager and Update Manager should be fixed
Padraig O'Briain <padraig.obriain@sun.com>
parents:
928
diff
changeset
|
56 |
# W0142: Used * or ** magic |
1e2405e83d3a
9788 pylint errors in Package Manager and Update Manager should be fixed
Padraig O'Briain <padraig.obriain@sun.com>
parents:
928
diff
changeset
|
57 |
# R0921: Abstract class not referenced |
483 | 58 |
# |
59 |
# W0212: Access to a protected member (fix) |
|
60 |
# Some duplicated code is giving us a number of protected access warnings that we will get rid of when this code duplication is removed |
|
61 |
# W0612: Unused variable (fix) |
|
62 |
# Some of the access methods we use in return a number of elements of which we only need to use one |
|
63 |
||
1217
1e2405e83d3a
9788 pylint errors in Package Manager and Update Manager should be fixed
Padraig O'Briain <padraig.obriain@sun.com>
parents:
928
diff
changeset
|
64 |
disable-msg=C0111,W0511,W0613,W0704,W0142,R0921 |
483 | 65 |
|
66 |
||
67 |
[REPORTS] |
|
68 |
||
69 |
[BASIC] |
|
70 |
||
71 |
# Required attributes for module, separated by a comma |
|
72 |
required-attributes= |
|
73 |
||
74 |
# Regular expression which should only match functions or classes name which do |
|
75 |
# not require a docstring |
|
76 |
no-docstring-rgx=__.*__ |
|
77 |
||
78 |
# Regular expression which should only match correct module names |
|
79 |
module-rgx=(([a-z_][a-zA-Z0-9_-]*)|([A-Z][a-zA-Z0-9_-]+))$ |
|
80 |
||
81 |
# Regular expression which should only match correct module level names |
|
82 |
const-rgx=(([a-zA-Z_][a-zA-Z1-9_]*)|(__.*__))$ |
|
83 |
||
84 |
# Regular expression which should only match correct class names |
|
85 |
class-rgx=[A-Z_][a-zA-Z0-9]+$ |
|
86 |
||
87 |
# Regular expression which should only match correct function names |
|
88 |
function-rgx=[a-z_][a-zA-Z0-9_]*$ |
|
89 |
||
90 |
# Regular expression which should only match correct method names |
|
91 |
method-rgx=[a-z_][a-zA-Z0-9_]*$ |
|
92 |
||
93 |
# Regular expression which should only match correct instance attribute names |
|
94 |
attr-rgx=[a-z_][a-zA-Z0-9_]*$ |
|
95 |
||
96 |
# Regular expression which should only match correct argument names |
|
97 |
argument-rgx=[a-z_][a-zA-Z0-9_]*$ |
|
98 |
||
99 |
# Regular expression which should only match correct variable names |
|
100 |
variable-rgx=[a-z_][a-zA-Z0-9_]*$ |
|
101 |
||
102 |
# Regular expression which should only match correct list comprehension / |
|
103 |
# generator expression variable names |
|
104 |
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ |
|
105 |
||
106 |
# Good variable names which should always be accepted, separated by a comma |
|
107 |
good-names=N_ |
|
108 |
#good-names=i,j,k,ex,Run,_,Q_ |
|
109 |
||
110 |
[TYPECHECK] |
|
111 |
||
112 |
[VARIABLES] |
|
113 |
||
808
6c89385ac9ff
4463 Change PM and UM to use _() as opposed to self._()
Padraig O'Briain <padraig.obriain@sun.com>
parents:
578
diff
changeset
|
114 |
# In this case we define '_' (the function name for gettext) so that pylint |
6c89385ac9ff
4463 Change PM and UM to use _() as opposed to self._()
Padraig O'Briain <padraig.obriain@sun.com>
parents:
578
diff
changeset
|
115 |
# doesn't complain about things like _("this is i18n string") |
6c89385ac9ff
4463 Change PM and UM to use _() as opposed to self._()
Padraig O'Briain <padraig.obriain@sun.com>
parents:
578
diff
changeset
|
116 |
additional-builtins=_ |
6c89385ac9ff
4463 Change PM and UM to use _() as opposed to self._()
Padraig O'Briain <padraig.obriain@sun.com>
parents:
578
diff
changeset
|
117 |
|
6c89385ac9ff
4463 Change PM and UM to use _() as opposed to self._()
Padraig O'Briain <padraig.obriain@sun.com>
parents:
578
diff
changeset
|
118 |
[CLASSES] |
483 | 119 |
|
120 |
[DESIGN] |
|
121 |
||
122 |
# Maximum number of arguments for function / method |
|
928
c74cd8014b6f
6352 Add MimeType support for adding Authorities and Packages via PM (follow on)
John Rice <john.rice@sun.com>
parents:
927
diff
changeset
|
123 |
max-args=15 |
483 | 124 |
|
125 |
# Maximum number of locals for function / method body |
|
578
da257532b3f2
3816 RFE UpdateManager notify users of repo updates
John Rice <john.rice@sun.com>
parents:
500
diff
changeset
|
126 |
max-locals=60 |
483 | 127 |
|
128 |
# Maximum number of return / yield for function / method body |
|
1572
b1bcb39eb27c
13234 PM Package Version Info failing in certain instances
John Rice <john.rice@sun.com>
parents:
1539
diff
changeset
|
129 |
max-returns=30 |
483 | 130 |
|
131 |
# Maximum number of branch for function / method body |
|
1539 | 132 |
max-branchs=50 |
483 | 133 |
|
134 |
# Maximum number of statements in function / method body |
|
1650
4538ffc7c034
13333 PM Provide user notification when errors written to log in GUI.
John Rice <john.rice@sun.com>
parents:
1645
diff
changeset
|
135 |
max-statements=350 |
483 | 136 |
|
137 |
# Maximum number of parents for a class (see R0901). |
|
138 |
max-parents=7 |
|
139 |
||
140 |
# Maximum number of attributes for a class (see R0902). |
|
141 |
# Require large number of instance attributes as we are loading up handles to widget elements and only want to do this in init |
|
142 |
# for performance reasons |
|
1650
4538ffc7c034
13333 PM Provide user notification when errors written to log in GUI.
John Rice <john.rice@sun.com>
parents:
1645
diff
changeset
|
143 |
max-attributes=250 |
483 | 144 |
|
145 |
# Minimum number of public methods for a class (see R0903). |
|
146 |
min-public-methods=0 |
|
147 |
||
148 |
# Maximum number of public methods for a class (see R0904). |
|
1338
3fdad345dda6
10524 Provide additional information on traceback
Michal Pryc <Michal.Pryc@Sun.Com>
parents:
1259
diff
changeset
|
149 |
# Increase from 56 to 60 as we are deriving off various classes and can't reduce the number further |
3fdad345dda6
10524 Provide additional information on traceback
Michal Pryc <Michal.Pryc@Sun.Com>
parents:
1259
diff
changeset
|
150 |
max-public-methods=60 |
483 | 151 |
|
152 |
[IMPORTS] |
|
153 |
||
154 |
[FORMAT] |
|
155 |
||
156 |
# Maximum number of characters on a single line. |
|
157 |
# |
|
158 |
max-line-length=90 |
|
159 |
||
160 |
# Maximum number of lines in a module |
|
161 |
# Increased from 1500 as the packagemanager is doing a lot of GUI initialisation that we can't logically put anywhere else. |
|
1744
04532a16c1ac
9437 current multi-part name algorithm is goofy
Michal Pryc <Michal.Pryc@Sun.Com>
parents:
1722
diff
changeset
|
162 |
max-module-lines=6100 |
483 | 163 |
|
164 |
# String used as indentation unit. This is usually " " (4 spaces) or |
|
165 |
# "\t" (1 tab). |
|
166 |
# |
|
167 |
indent-string=' ' |
|
168 |
||
169 |
[MISCELLANEOUS] |
|
170 |
||
171 |
[SIMILARITIES] |
|
172 |