File tree Expand file tree Collapse file tree 1 file changed +13
-17
lines changed
Expand file tree Collapse file tree 1 file changed +13
-17
lines changed Original file line number Diff line number Diff line change 77jobs :
88 clang-format :
99 runs-on : ubuntu-latest
10+ strategy :
11+ matrix :
12+ path :
13+ - check : ' LuaParser'
14+ - check : ' CodeFormatCode'
15+ - check : ' CodeFormatLib'
16+ - check : ' CodeFormat'
17+ - check : ' CodeFormatServer'
1018 steps :
1119 - name : Checkout code
1220 uses : actions/checkout@v3
1321 with :
1422 ref : ${{ github.event.pull_request.head.sha }}
15- - name : Install ClangFormat
16- run : sudo apt-get install -y clang-format
17- - name : Run ClangFormat
18- run : clang-format -style=file -output-replacements-xml $(find . -name '*.cpp' -or -name '*.h' -not -path "./3rd/*" -not -path "./Test/*" -not -path "./Test2/*") | grep -c '<replacement ' > /tmp/clang-format-result
19- - name : Comment on pull request
20- uses : actions/github-script@v4
23+ - name : Clang Format Checker
24+ -
uses :
jidicula/[email protected] 2125 with :
22- github-token : ${{ secrets.GITHUB_TOKEN }}
23- script : |
24- const fs = require('fs');
25- const result = fs.readFileSync('/tmp/clang-format-result', 'utf8');
26- const comment = `ClangFormat check found ${result} formatting issues.`;
27- github.issues.createComment({
28- issue_number: context.issue.number,
29- owner: context.repo.owner,
30- repo: context.repo.repo,
31- body: comment
32- });
26+ clang-format-version : ' 17'
27+ check-path : ${{ matrix.path['check'] }}
28+ fallback-style : ' file'
You can’t perform that action at this time.
0 commit comments