File tree Expand file tree Collapse file tree 2 files changed +55
-1
lines changed
Expand file tree Collapse file tree 2 files changed +55
-1
lines changed Original file line number Diff line number Diff line change 1111 workflow_dispatch :
1212
1313jobs :
14+ lint :
15+ name : Lint & Type Check
16+ runs-on : ubuntu-latest
17+
18+ steps :
19+ - name : Checkout code
20+ uses : actions/checkout@v4
21+
22+ - name : Set up Python
23+ uses : actions/setup-python@v5
24+ with :
25+ python-version : ' 3.11'
26+
27+ - name : Install lint dependencies
28+ run : |
29+ python -m pip install --upgrade pip
30+ pip install ruff pyright
31+ pip install -r python/requirements.txt
32+
33+ - name : Run ruff linter
34+ working-directory : python
35+ run : ruff check .
36+
37+ - name : Run pyright type checker
38+ working-directory : python
39+ run : pyright
40+
1441 build-python-windows :
1542 name : Build Python (Windows)
43+ needs : [lint]
1644 runs-on : windows-latest
1745
1846 steps :
4674
4775 build-python-linux :
4876 name : Build Python (Linux)
77+ needs : [lint]
4978 runs-on : ubuntu-latest
5079
5180 steps :
84113
85114 build-csharp :
86115 name : Build C# (Windows)
116+ needs : [lint]
87117 runs-on : windows-latest
88118
89119 steps :
@@ -102,7 +132,7 @@ jobs:
102132
103133 - name : Build solution
104134 working-directory : csharp
105- run : msbuild StarCitizenPlaytimeCalculator.sln /p:Configuration=Release /p:Platform="Any CPU"
135+ run : msbuild StarCitizenPlaytimeCalculator.sln /p:Configuration=Release /p:Platform="Any CPU" /p:TreatWarningsAsErrors=true /p:RunAnalyzersDuringBuild=true
106136
107137 - name : Upload C# artifact
108138 uses : actions/upload-artifact@v4
Original file line number Diff line number Diff line change 1+ [tool .ruff ]
2+ line-length = 120
3+ target-version = " py311"
4+
5+ [tool .ruff .lint ]
6+ select = [
7+ " E" , # pycodestyle errors
8+ " F" , # pyflakes
9+ " W" , # pycodestyle warnings
10+ " B" , # flake8-bugbear
11+ " I" , # isort
12+ ]
13+ ignore = [
14+ " E501" , # line too long (handled by formatter)
15+ ]
16+
17+ [tool .pyright ]
18+ pythonVersion = " 3.11"
19+ typeCheckingMode = " basic"
20+ reportMissingImports = true
21+ reportMissingTypeStubs = false
22+ reportUnusedImport = true
23+ reportUnusedVariable = true
24+ reportAttributeAccessIssue = true
You can’t perform that action at this time.
0 commit comments