Skip to content

Commit a343735

Browse files
authored
GitHub Action to run cpplint on pushes & pull requests (#3)
* GitHub Action to run cpplint on pushes & pull requests This is a much simpler solution that loads quickly but does not require a custom Dockerfile. * Update README.md * Delete dockerimage.yml * Delete main.yml * Delete Dockerfile * Delete entrypoint.sh * Update README.md * Update cpplint.yml
1 parent abd0a2c commit a343735

File tree

6 files changed

+21
-63
lines changed

6 files changed

+21
-63
lines changed

.github/workflows/cpplint.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# GitHub Action to run cpplint recursively on all pushes and pull requests
2+
# https://github.com/cpplint/GitHub-Action-for-cpplint
3+
4+
name: cpplint
5+
on: [push, pull_request]
6+
jobs:
7+
cpplint:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v1
11+
- uses: actions/setup-python@v1
12+
- run: pip install cpplint
13+
- run: cpplint --recursive .

.github/workflows/dockerimage.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

Dockerfile

Lines changed: 0 additions & 15 deletions
This file was deleted.

README.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,18 @@ Each time that new code is pushed into your repo, you can have a [cpplint](https
55
Example workflow:
66
* Put the following text into a file named `.github/workflows/cpplint.yml` in your repo):
77
```yaml
8-
on: push
9-
name: on push
8+
name: cpplint
9+
on: [push, pull_request]
1010
jobs:
11-
gitHubActionForCpplint:
12-
name: GitHub Action for cpplint
11+
cpplint:
1312
runs-on: ubuntu-latest
1413
steps:
15-
- uses: actions/checkout@master
16-
- name: GitHub Action for cpplint
17-
uses: cpplint/GitHub-Action-for-cpplint@master
18-
with:
19-
args: cpplint --recursive .
14+
- uses: actions/checkout@v1
15+
- uses: actions/setup-python@v1
16+
- run: pip install cpplint
17+
- run: cpplint --recursive .
2018
```
21-
22-
Or to add other cpplint options to "__args =__" above.
23-
19+
Customize the final line to match your requirements.
2420
```
2521
Syntax: cpplint.py [--verbose=#] [--output=emacs|eclipse|vs7|junit]
2622
[--filter=-x,+y,...]

entrypoint.sh

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)