forked from nobodies-collective/Humans
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
146 lines (134 loc) · 8.13 KB
/
Copy pathDirectory.Build.props
File metadata and controls
146 lines (134 loc) · 8.13 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
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<Project>
<PropertyGroup>
<MinVerTagPrefix>v</MinVerTagPrefix>
<NeutralLanguage>en</NeutralLanguage>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<!-- Ship satellite assemblies for every culture in CultureCatalog.SupportedCultureCodes -->
<SatelliteResourceLanguages>en;es;ca;de;fr;it</SatelliteResourceLanguages>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!--
Analyzer rule IDs whose Warning severity must NOT be promoted to Error:
- HUM0009: grandfathered repository/DbContext violators carrying
[Grandfathered("HUM0009", ...)] — warnings stay warnings until the
last [Grandfathered] is deleted.
- HUM0010 / HUM0011: [ExpiresOn] deadline analyzer. The whole point
is staged escalation — warning before the date / during the grace
window, then error. Past-deadline diagnostics are emitted with
effectiveSeverity: Error directly (bypasses this list); pre-deadline
warnings must stay warnings so the deadline mechanism works.
- HUM0014: Web class injects a repository directly. Grandfathered via
[Grandfathered("HUM0014", ...)] for the auth claims transformation,
which sits on the request-time hot path and cannot afford to drag in
the IRoleAssignmentService / ITeamService ctor chain (notifications,
system-team sync, Hangfire scheduler). See issue #750.
- HUM0017 / HUM0018: cross-section repository injection (HUM0017)
and "section indeterminate" companion (HUM0018, fires only when
HUM0017 cannot resolve a repository's [Section]). Both start as
true warnings so existing violations surface without breaking the
build; promote to error once they're all fixed (delete these
entries).
- HUM_USER_DISPLAYNAME: [Obsolete] marker on User.DisplayName.
Legitimate consumers (Identity claims, merge/purge/delete labels,
GDPR export, dev seeders, email greetings, admin merge UI) remain
until UserInfo handles are threaded through every Application-layer
service entry point per issue #691. Kept visible as warnings (not
hidden via NoWarn in production projects) so new render-path
violations stay surfaced.
- HUM0019: read of Identity-derived User column from Application or
Web (issue nobodies-collective/Humans#506). Stays a warning while
legacy reads (computed-override projections of UserEmails) are
migrated through UserInfo / IUserEmailService. Promote to error
once all reads are gone (delete this entry).
- HUM0024: cross-section EF navigation joins. Error by default;
existing configuration debt carries [Grandfathered("HUM0024", ...)]
to downgrade to warning while those joins are migrated to bare FK
columns and service-level stitching. Remove this entry once the
last [Grandfathered("HUM0024", ...)] is gone.
- HUM0025: a DbSet table referenced (read or written) by more than
one repository. Error by default; existing shared-table debt carries
[Grandfathered("HUM0025", ..., scope: "<DbSet>")] on each participating
repository to downgrade to warning while the foreign access is migrated
through the owning section's service. (Subsumes the retired per-section
HUM0022 Notifications + HUM0023 Events write analyzers.) Remove this
entry once the last [Grandfathered("HUM0025", ...)] is gone.
- HUM0028: cache-invalidator interface ratchet. Error by default;
every existing *Invalidator interface carries
[Grandfathered("HUM0028", ...)] to downgrade to warning while the
family is migrated into owning-section services + caching decorators.
A new *Invalidator (no [Grandfathered]) fires Error. Exit condition:
remove this entry once the last [Grandfathered("HUM0028", ...)] is
gone (i.e., every cross-section invalidator has been absorbed).
- HUM0031: controller business-logic thresholds. Error by default;
the worst pre-existing offender methods carry
[Grandfathered("HUM0031", ...)] to downgrade to warning until they
are refactored into their section's application service. A new
breach (no [Grandfathered]) fires Error. The thresholds are
hardcoded in ControllerBusinessLogicAnalyzer and ratchet DOWN over
time. Exit condition: remove this entry once the last
[Grandfathered("HUM0031", ...)] is gone.
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors);HUM0009;HUM0010;HUM0011;HUM0014;HUM0017;HUM0018;HUM0019;HUM0024;HUM0025;HUM0028;HUM0031;HUM_USER_DISPLAYNAME</WarningsNotAsErrors>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel>latest</AnalysisLevel>
<!-- CS1591: Missing XML comment for publicly visible type or member -->
<!-- MA0048: File name must match type name -->
<!-- MA0016: Prefer using collection abstraction instead of implementation -->
<!-- MA0026: Fix TODO comment -->
<!-- MA0051: Method is too long -->
<!-- VSTHRD200: Async suffix not required for ASP.NET Core controller actions -->
<!-- HUM_PROFILE_ISSUSPENDED: Profile.IsSuspended legacy reads remain valid; -->
<!-- Issue #635 §15i: arch test pins zero NEW writers; readers stay until -->
<!-- the lazy-State-backfill follow-up makes State the canonical read. -->
<!-- HUM_USER_NORMALIZEDEMAIL: User.NormalizedEmail is shadow-populated by -->
<!-- Identity; application-code reads are not canonical but a few legacy -->
<!-- reads remain. Issue #635 §15i. -->
<NoWarn>$(NoWarn);CS1591;MA0048;MA0016;MA0026;MA0051;VSTHRD200;HUM_PROFILE_ISSUSPENDED;HUM_USER_NORMALIZEDEMAIL</NoWarn>
</PropertyGroup>
<!-- Embed git commit hash into InformationalVersion at build time (skip when already set via -p:SourceRevisionId) -->
<Target Name="SetSourceRevisionId" BeforeTargets="InitializeSourceControlInformation" Condition="'$(SourceRevisionId)' == ''">
<Exec Command="git rev-parse --short HEAD" ConsoleToMSBuild="true" IgnoreExitCode="true" StandardErrorImportance="low">
<Output TaskParameter="ConsoleOutput" PropertyName="SourceRevisionId" />
</Exec>
</Target>
<!-- Versioning -->
<ItemGroup>
<PackageReference Include="MinVer">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<!--
NuGet audit suppressions for Magick.NET-Q8-AnyCPU 14.13.1.
14.13.1 is the latest published version; these are upstream ImageMagick
native-library CVEs awaiting a new Magick.NET release. Revisit on each
Magick.NET bump and prune entries that are no longer reported.
-->
<ItemGroup>
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-98cp-rj9f-6v5g" />
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-8vfj-q2cp-5m5j" />
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-pmpg-6pww-fg6q" />
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-q8h3-jv9v-57qx" />
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-w54j-7wpm-crhj" />
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-x928-4434-crqj" />
</ItemGroup>
<!-- Analyzers -->
<ItemGroup>
<PackageReference Include="Roslynator.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Meziantou.Analyzer">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>