Repository navigation
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
50 lines (40 loc) · 2.54 KB
/
Copy pathDirectory.Build.props
File metadata and controls
50 lines (40 loc) · 2.54 KB
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
<Project>
<PropertyGroup>
<!-- Security rules at full strength across every project.
The build already runs SonarAnalyzer and Roslynator, but neither turns
on the .NET security analyzers (CA2100 SQL injection, CA3003 file-path
injection, CA5350+ weak crypto) beyond their default subset. This app
parses JSON from TrainerHill and HTML from the Limitless scrape, writes
both to SQLite, and reads user-chosen files off disk — the exact shapes
those rules exist for.
Complementary to the CodeQL workflow rather than redundant: these match
dangerous API shapes at a single call site, CodeQL follows a value
across methods. TcgDex.CSharpSdk found the difference concretely — a
deliberate `new Random()` probe went unflagged by the analyzers while
`SHA1.Create()` was caught. -->
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<!-- IDE style rules (IDExxxx) are editor-only unless this is set, so an .editorconfig
severity has no effect on the build without it. Turned on for the explicit-type
rule; see the var block in .editorconfig for why that one is a temporarily
acceptable warning. -->
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AnalysisModeSecurity>All</AnalysisModeSecurity>
<!-- TreatWarningsAsErrors is deliberately NOT set, and this is a decision
rather than an omission. It is right for a library like
TcgDex.CSharpSdk and wrong here, for three reasons:
Generated code. CommunityToolkit.Mvvm emits a .g.cs per
[ObservableProperty] and [RelayCommand], and the XAML compiler emits
more. A warning in code nobody wrote would stop the build.
Cross-platform. The app multi-targets Windows, Android, iOS and
MacCatalyst, and platform analyzers disagree across heads — CA1416
already fires on the reference-only net10.0 TFM for a call that is
valid on every TFM that ships. iOS and MacCatalyst are never built
here or in CI, so errors there would land on whoever built them next.
And it is a hard rule in the middle of interactive work. An SDK is
written in long deliberate passes; a UI is written by running it,
looking at it, and changing it. A build that refuses to produce a
binary over an unused variable makes that loop worse.
Zero warnings is still the standard — it is enforced by reading the
build output, not by breaking it. -->
</PropertyGroup>
</Project>