Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
52dc343f
Commit
52dc343f
authored
9 years ago
by
Ned Batchelder
Browse files
Options
Downloads
Plain Diff
Merge pull request #11846 from edx/ned/help-for-linter
Add help.
parents
eb42cb1f
d2b1d535
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/safe_template_checker.py
+14
-2
14 additions, 2 deletions
scripts/safe_template_checker.py
with
14 additions
and
2 deletions
scripts/safe_template_checker.py
+
14
−
2
View file @
52dc343f
...
...
@@ -171,7 +171,8 @@ class MakoTemplateChecker(object):
_skip_mako_dirs
=
_skip_dirs
_results
=
[]
def
__init__
(
self
):
self
.
_results
=
[]
def
process_file
(
self
,
directory
,
file_name
):
"""
...
...
@@ -399,7 +400,8 @@ class UnderscoreTemplateChecker(object):
_skip_underscore_dirs
=
_skip_dirs
_results
=
[]
def
__init__
(
self
):
self
.
_results
=
[]
def
process_file
(
self
,
directory
,
file_name
):
"""
...
...
@@ -481,6 +483,16 @@ def _process_os_walk(starting_dir, template_checkers):
def
main
():
#TODO: Use click
if
'
--help
'
in
sys
.
argv
:
print
"
Check that templates are safe.
"
print
"
Options:
"
print
"
--quiet Just display the filenames with violations.
"
print
print
"
Rules:
"
for
rule
in
Rules
.
__members__
.
values
():
print
"
{0[0]}: {0[1]}
"
.
format
(
rule
.
value
)
return
is_quiet
=
'
--quiet
'
in
sys
.
argv
options
=
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment