Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
5ed3e5ed
Commit
5ed3e5ed
authored
Nov 22, 2017
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make run_quality use the same upper pylint limit as run_pylint
parent
97f12ff2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
pavelib/quality.py
+7
-4
scripts/generic-ci-tests.sh
+1
-1
No files found.
pavelib/quality.py
View file @
5ed3e5ed
...
...
@@ -685,6 +685,7 @@ def _get_xsscommitlint_count(filename):
@cmdopts
([
(
"compare-branch="
,
"b"
,
"Branch to compare against, defaults to origin/master"
),
(
"percentage="
,
"p"
,
"fail if diff-quality is below this percentage"
),
(
"limit="
,
"l"
,
"Limits for number of acceptable violations - either <upper> or <lower>:<upper>"
),
])
@timed
def
run_quality
(
options
):
...
...
@@ -730,7 +731,7 @@ def run_quality(options):
lines
.
extend
([
sep
,
title
,
sep
,
violations_str
,
sep
,
violations_count_str
])
if
count
>
limit
:
if
count
>
limit
>
-
1
:
lines
.
append
(
fail_line
)
lines
.
append
(
sep
+
'
\n
'
)
if
is_html
:
...
...
@@ -757,14 +758,16 @@ def run_quality(options):
(
count
,
violations_list
)
=
_get_pylint_violations
(
clean
=
False
)
_
,
upper_violations_limit
,
_
,
_
=
_parse_pylint_options
(
options
)
# Print number of violations to log
print
_lint_output
(
'pylint'
,
count
,
violations_list
,
limit
=
6100
)
print
_lint_output
(
'pylint'
,
count
,
violations_list
,
limit
=
upper_violations_limit
)
# Also write the number of violations to a file
with
open
(
dquality_dir
/
"diff_quality_pylint.html"
,
"w"
)
as
f
:
f
.
write
(
_lint_output
(
'pylint'
,
count
,
violations_list
,
is_html
=
True
,
limit
=
6100
))
f
.
write
(
_lint_output
(
'pylint'
,
count
,
violations_list
,
is_html
=
True
,
limit
=
upper_violations_limit
))
if
count
>
6100
:
if
count
>
upper_violations_limit
>
-
1
:
diff_quality_percentage_pass
=
False
# ----- Set up for diff-quality pylint call -----
...
...
scripts/generic-ci-tests.sh
View file @
5ed3e5ed
...
...
@@ -116,7 +116,7 @@ case "$TEST_SUITE" in
run_paver_quality run_xsscommitlint
||
EXIT
=
1
# Run quality task. Pass in the 'fail-under' percentage to diff-quality
echo
"Running diff quality."
run_paver_quality run_quality
-p
100
||
EXIT
=
1
run_paver_quality run_quality
-p
100
-l
$LOWER_PYLINT_THRESHOLD
:
$UPPER_PYLINT_THRESHOLD
||
EXIT
=
1
# Need to create an empty test result so the post-build
# action doesn't fail the build.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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