-
-
Notifications
You must be signed in to change notification settings - Fork 386
36 lines (33 loc) · 1.17 KB
/
code_style_check.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
name: Code style check
on:
workflow_call:
permissions: {}
jobs:
style:
name: Code style check
runs-on: ubuntu-24.04
timeout-minutes: 10
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 50
- name: Setup clang-format
run: |
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-17 100
sudo update-alternatives --install /usr/bin/clang-format-diff clang-format-diff /usr/bin/clang-format-diff-17 100
- name: Check code format
run: |
bash script/tools/check_code_format.sh
- name: Check copyright headers
run: |
bash script/tools/check_copyright_headers.sh
- name: Check LegalCopyright date in fheroes2.rc
run: |
(grep "VALUE \"LegalCopyright\", *\"\\\\251 $(date +%Y) fheroes2 Resurrection team" src/resources/fheroes2.rc > /dev/null && \
echo "The date specified in the LegalCopyright entry is valid.") || \
(echo "Please update the date in the LegalCopyright entry!" && false)
- name: Check format of markdown files
uses: DavidAnson/markdownlint-cli2-action@v19