Skip to content

Comments

Travis CI: Add automated tests to find syntax errors#408

Merged
jiangzhonglian merged 1 commit intoapachecn:devfrom
cclauss:patch-1
Jul 27, 2018
Merged

Travis CI: Add automated tests to find syntax errors#408
jiangzhonglian merged 1 commit intoapachecn:devfrom
cclauss:patch-1

Conversation

@cclauss
Copy link
Contributor

@cclauss cclauss commented Jul 25, 2018

Use flake8 to look for Python syntax errors or undefined names on both Python 2.7 and Python 3.7.

E901,E999,F821,F822,F823 are the "showstopper" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. Most other flake8 issues are merely "style violations" -- useful for readability but they do not effect runtime safety. This PR therefore recommends a flake8 run of these tests on the entire codebase.

  • F821: undefined name name
  • F822: undefined name name in __all__
  • F823: local variable name referenced before assignment
  • E901: SyntaxError or IndentationError
  • E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree

@jiangzhonglian jiangzhonglian merged commit 05ab921 into apachecn:dev Jul 27, 2018
@cclauss cclauss deleted the patch-1 branch July 27, 2018 05:43
@cclauss
Copy link
Contributor Author

cclauss commented Jul 27, 2018

https://travis-ci.org/apachecn would need to turned on like
https://travis-ci.org/apache is for these automated tests to run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants