Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mentors.debian.net
debexpo
Commits
3bedbf46
Commit
3bedbf46
authored
Aug 19, 2012
by
Clément Schreiner
Browse files
Add a LintianSeverity for lintian-clean packages. + PEP8 compliance
parent
459cdd71
Changes
1
Show whitespace changes
Inline
Side-by-side
debexpo/plugins/qa/lintian.py
View file @
3bedbf46
...
@@ -67,12 +67,16 @@ severities = {
...
@@ -67,12 +67,16 @@ severities = {
constants
.
PLUGIN_SEVERITY_INFO
),
constants
.
PLUGIN_SEVERITY_INFO
),
'X'
:
LintianSeverity
(
'Package has lintian experimental tags'
,
0
,
'X'
:
LintianSeverity
(
'Package has lintian experimental tags'
,
0
,
constants
.
PLUGIN_SEVERITY_INFO
),
constants
.
PLUGIN_SEVERITY_INFO
),
''
:
LintianSeverity
(
'Package is lintian clean'
,
-
1
,
constants
.
PLUGIN_SEVERITY_INFO
),
}
}
@
test_result
@
test_result
class
LintianTest
(
PluginResult
):
class
LintianTest
(
PluginResult
):
""" Summary of the lintian results """
""" Summary of the lintian results """
# -1 -> package is clean
max_lintian_severity
=
string_field
(
'max_lintian_severity'
)
max_lintian_severity
=
string_field
(
'max_lintian_severity'
)
severity
=
int_field
(
'severity'
)
severity
=
int_field
(
'severity'
)
...
@@ -159,9 +163,14 @@ class LintianPlugin(QAPlugin):
...
@@ -159,9 +163,14 @@ class LintianPlugin(QAPlugin):
+
" "
.
join
(
override_comments
)
+
")"
)
+
" "
.
join
(
override_comments
)
+
")"
)
override_comments
=
[]
override_comments
=
[]
for
line
in
lintian_data
:
for
line
in
lintian_data
:
self
.
new_result
(
LintianWarning
,
package
=
package
,
severity
=
severity
,
self
.
new_result
(
LintianWarning
,
package
=
package
,
tag
=
lintian_tag
,
data
=
line
)
severity
=
severity
,
tag
=
lintian_tag
,
data
=
line
)
if
not
lintian_severities
:
max_lintian_severity
=
''
else
:
max_lintian_severity
=
max
(
lintian_severities
,
max_lintian_severity
=
max
(
lintian_severities
,
key
=
lambda
s
:
severities
[
s
].
int
)
key
=
lambda
s
:
severities
[
s
].
int
)
severity
=
severities
[
max_lintian_severity
].
plugin_severity
severity
=
severities
[
max_lintian_severity
].
plugin_severity
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment