Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
609260cd
Unverified
Commit
609260cd
authored
Jul 22, 2019
by
Hongkun Yu
Committed by
GitHub
Jul 22, 2019
Browse files
Update lint presubmit to be consistent with tensorflow (#7278)
Only care about errors and output into an error file.
parent
1fc839bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
official/utils/testing/scripts/ci_sanity.sh
official/utils/testing/scripts/ci_sanity.sh
+15
-1
No files found.
official/utils/testing/scripts/ci_sanity.sh
View file @
609260cd
...
...
@@ -78,6 +78,18 @@ do_pylint() {
echo
"pylint took
$((
PYLINT_END_TIME
-
PYLINT_START_TIME
))
s"
echo
""
# Report only what we care about
# Ref https://pylint.readthedocs.io/en/latest/technical_reference/features.html
# E: all errors
# W0311 bad-indentation
# W0312 mixed-indentation
# C0330 bad-continuation
# C0301 line-too-long
# C0326 bad-whitespace
# W0611 unused-import
# W0622 redefined-builtin
grep
-E
'(\[E|\[W0311|\[W0312|\[C0330|\[C0301|\[C0326|\[W0611|\[W0622)'
${
OUTPUT_FILE
}
>
${
ERRORS_FILE
}
N_ERRORS
=
0
while
read
-r
LINE
;
do
IS_WHITELISTED
=
0
...
...
@@ -94,7 +106,9 @@ do_pylint() {
echo
""
>>
${
NONWL_ERRORS_FILE
}
((
N_ERRORS++
))
fi
done
<
${
OUTPUT_FILE
}
done
<
${
ERRORS_FILE
}
echo
"Raw lint output file:
${
OUTPUT_FILE
}
"
echo
""
if
[[
${
N_ERRORS
}
!=
0
]]
;
then
...
...
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