|
1 |
| -# GitHub Action for running Flake8 commands |
| 1 | +# GitHub Action for running cpplint commands |
2 | 2 |
|
3 |
| -Each time that new code is pushed into your repo, you can have a [Flake8](http://flake8.pycqa.org) command automatically run. |
| 3 | +Each time that new code is pushed into your repo, you can have a [cpplint](https://github.com/cpplint/cpplint) command automatically run. |
4 | 4 |
|
5 | 5 | Example workflow:
|
6 | 6 | * Put the following text into a file named `.github/main.workflow` in your repo):
|
7 | 7 | ```hcl
|
8 | 8 | workflow "New workflow" {
|
9 | 9 | on = "push"
|
10 |
| - resolves = ["Flake8 command"] |
| 10 | + resolves = ["cpplint command"] |
11 | 11 | }
|
12 | 12 |
|
13 |
| -action "Flake8 command" { |
14 |
| - uses = "cclauss/GitHub-Action-for-Flake8@master" |
15 |
| - args = "flake8 . --max-line-length=88" |
| 13 | +action "cpplint command" { |
| 14 | + uses = "cclauss/GitHub-Action-for-cpplint@master" |
| 15 | + args = "cpplint ." |
16 | 16 | }
|
17 | 17 | ```
|
18 |
| - |
19 |
| -Or to use [Flake8](http://flake8.pycqa.org) to find Python 3 syntax errors and undefined names, try: |
20 |
| - |
21 |
| -$ __flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__ |
22 |
| - |
23 |
| -__E901,E999,F821,F822,F823__ are the "_showstopper_" [flake8](http://flake8.pycqa.org) issues that can halt the runtime with a SyntaxError, NameError, etc. These 5 are different from most other flake8 issues which are merely "style violations" -- useful for readability but they do not effect runtime safety. |
24 |
| -* F821: undefined name `name` |
25 |
| -* F822: undefined name `name` in `__all__` |
26 |
| -* F823: local variable name referenced before assignment |
27 |
| -* E901: SyntaxError or IndentationError |
28 |
| -* E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree |
| 18 | +Or to add other [cpplint options](http://flake8.pycqa.org) to __args =__ above. |
0 commit comments