-
Notifications
You must be signed in to change notification settings - Fork 136
67 lines (67 loc) · 1.75 KB
/
Linter.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Linter
on:
pull_request:
types: [opened, synchronize]
jobs:
Branch:
runs-on: ubuntu-latest
steps:
# If Branch name is not develop, comment
- name: Test Branch Name
if: github.base_ref != 'develop'
run: |
echo 'Please PR on develop branch.'
exit 1
C:
runs-on: ubuntu-latest
steps:
# Clone Repository
- name: Checkout
uses: actions/checkout@v2
# Perform lint on user's files.
- name: User's Lint
run: |
chmod +x style/run-lint.sh
style/run-lint.sh c
Cppcheck:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Requirements
run: |
sudo apt-get install cppcheck=1.90-4build1
- name: User's Lint
run: |
chmod +x style/run-lint.sh
style/run-lint.sh cppcheck
Python:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install Requirements
run: |
pip install pylint==2.4.4
- name: Run Pylint
run: |
chmod +x style/run-lint.sh
style/run-lint.sh python
Shell:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Requirements
run: |
sudo apt install xz-utils
wget -qO- "https://github.com/koalaman/shellcheck/releases/download/v0.7.0/shellcheck-v0.7.0.linux.x86_64.tar.xz" | tar -xJv
sudo cp "shellcheck-v0.7.0/shellcheck" /usr/bin/
- name: User's Lint
run: |
chmod +x style/run-lint.sh
style/run-lint.sh shell