├── .gitignore ├── errorrules.py ├── fixjsstyle.py ├── gjslint.bat └── gjslint.py /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | *.pyc 3 | -------------------------------------------------------------------------------- /errorrules.py: -------------------------------------------------------------------------------- 1 | from closure_linter import errors 2 | from closure_linter import errorrules 3 | 4 | OriginalShouldReportError = None 5 | 6 | def InjectErrorReporter(): 7 | global OriginalShouldReportError 8 | OriginalShouldReportError = errorrules.ShouldReportError 9 | errorrules.ShouldReportError = ShouldReportError 10 | 11 | def ShouldReportError(error): 12 | global OriginalShouldReportError 13 | return error not in (errors.LINE_TOO_LONG,) and OriginalShouldReportError(error) 14 | 15 | -------------------------------------------------------------------------------- /fixjsstyle.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from closure_linter import fixjsstyle 4 | import errorrules 5 | 6 | if __name__ == '__main__': 7 | errorrules.InjectErrorReporter() 8 | fixjsstyle.main() 9 | -------------------------------------------------------------------------------- /gjslint.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | python %~dp0gjslint.py %* -------------------------------------------------------------------------------- /gjslint.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from closure_linter import gjslint 4 | import errorrules 5 | 6 | if __name__ == '__main__': 7 | errorrules.InjectErrorReporter() 8 | gjslint.main() 9 | --------------------------------------------------------------------------------