-
Notifications
You must be signed in to change notification settings - Fork 113
112 lines (102 loc) · 3 KB
/
linters.yaml
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Linters (clang, l10n)
on:
# Triggers the workflow on pull request events but only for the main branch
pull_request:
branches:
- main
- 'releases/**'
types:
- opened
- synchronize
- reopened
jobs:
linter:
name: Run Main Linters (clang, l10n, etc.)
runs-on: ubuntu-22.04
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Install dependecies
run: |
sudo apt-get update
sudo apt-get install -y aspell aspell-en $(./scripts/linux/getdeps.py -b linux/debian/control)
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- run: pip install -r requirements.txt
- name: Importing translation files
shell: bash
run: |
python3 scripts/utils/import_languages.py
- name: Generate updated .ts files and check for l10n errors
run: |
./scripts/utils/generate_ts.sh
python .github/l10n/check_l10n_issues.py
- name: Check for QRC errors
run: |
python scripts/ci/check_qrc.py
- name: Check for addons JSON syntax
run: |
python scripts/ci/check_jsonschema.py addon.json addons/*/manifest.json
- name: Check for issues with clang-format
uses: DoozyX/clang-format-lint-action@v0.16.2
with:
source: '.'
clangFormatVersion: 16
style: file
- name: Check for issues with cargo fmt
run: |
for tomlfile in $(git ls-files -c '*/Cargo.toml'); do
(cd $(dirname $tomlfile) && cargo fmt --check) || true
done
- name: Spell check documentation files
run: |
scripts/utils/spellcheck.sh list
ktlint:
name: Run ktLint
runs-on: ubuntu-latest
defaults:
run:
# This allows us to use conda
shell: bash -el {0}
steps:
- name: Clone repo
uses: actions/checkout@master
with:
fetch-depth: 1
- name: Cache conda Packages
uses: actions/cache@v2
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{hashFiles('env.yml')}}
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: vpn
environment-file: env.yml
- name: Setup Android SDK
run: |
conda info
./scripts/android/conda_setup_sdk.sh
- name: Run ktlint
working-directory: android
run: |
conda info
./gradlew ktlint
check-language-json:
name: Check if languages.json is valid
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
submodules: 'true'
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Run languagelocalizer
run: |
cd tools/languagelocalizer
npm install
node languageLocalizer.js --check