forked from CleverRaven/Cataclysm-DDA
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 1.09 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
name: Code Style Reviewer
on:
pull_request_target:
types: ['opened', 'reopened', 'synchronize', 'ready_for_review']
paths:
- '**.json'
- '**.cpp'
- '**.h'
- '**.c'
pull_request:
types: ['opened', 'reopened', 'synchronize', 'ready_for_review']
paths:
- '**.json'
- '**.cpp'
- '**.h'
- '**.c'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
style-code:
if: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.draft == false }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: '${{ github.event.pull_request.head.sha }}'
- run: sudo apt-get install astyle
- run: make astyle-fast
- run: make style-all-json-parallel
- name: 'suggester / JSON & C++'
uses: reviewdog/action-suggester@v1
if: ${{ always() }}
with:
tool_name: '[JSON & C++ formatters](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/DEVELOPER_TOOLING.md)'