Skip to content

Commit b68deb6

Browse files
committed
Validate package
1 parent acad56c commit b68deb6

File tree

4 files changed

+145
-0
lines changed

4 files changed

+145
-0
lines changed

.config/dotnet-tools.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
"commands": [
1414
"reportgenerator"
1515
]
16+
},
17+
"meziantou.framework.nugetpackagevalidation.tool": {
18+
"version": "1.0.9",
19+
"commands": [
20+
"meziantou.validate-nuget-package"
21+
]
1622
}
1723
}
1824
}
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/diagnostic-ids -->
3+
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
4+
<Suppression>
5+
<DiagnosticId>CP0001</DiagnosticId>
6+
<Target>T:MoreLinq.Experimental.AwaitQueryOptions</Target>
7+
<Left>lib/net451/MoreLinq.dll</Left>
8+
<Right>lib/netstandard1.0/MoreLinq.dll</Right>
9+
<IsBaselineSuppression>true</IsBaselineSuppression>
10+
</Suppression>
11+
<Suppression>
12+
<DiagnosticId>CP0001</DiagnosticId>
13+
<Target>T:MoreLinq.Experimental.IAwaitQuery`1</Target>
14+
<Left>lib/net451/MoreLinq.dll</Left>
15+
<Right>lib/netstandard1.0/MoreLinq.dll</Right>
16+
<IsBaselineSuppression>true</IsBaselineSuppression>
17+
</Suppression>
18+
<Suppression>
19+
<DiagnosticId>CP0001</DiagnosticId>
20+
<Target>T:MoreLinq.Extensions.ToDataTableExtension</Target>
21+
<Left>lib/net451/MoreLinq.dll</Left>
22+
<Right>lib/netstandard1.0/MoreLinq.dll</Right>
23+
<IsBaselineSuppression>true</IsBaselineSuppression>
24+
</Suppression>
25+
<Suppression>
26+
<DiagnosticId>CP0002</DiagnosticId>
27+
<Target>M:MoreLinq.Experimental.ExperimentalEnumerable.AsOrdered``1(MoreLinq.Experimental.IAwaitQuery{``0})</Target>
28+
<Left>lib/net451/MoreLinq.dll</Left>
29+
<Right>lib/netstandard1.0/MoreLinq.dll</Right>
30+
<IsBaselineSuppression>true</IsBaselineSuppression>
31+
</Suppression>
32+
<Suppression>
33+
<DiagnosticId>CP0002</DiagnosticId>
34+
<Target>M:MoreLinq.Experimental.ExperimentalEnumerable.AsSequential``1(MoreLinq.Experimental.IAwaitQuery{``0})</Target>
35+
<Left>lib/net451/MoreLinq.dll</Left>
36+
<Right>lib/netstandard1.0/MoreLinq.dll</Right>
37+
<IsBaselineSuppression>true</IsBaselineSuppression>
38+
</Suppression>
39+
<Suppression>
40+
<DiagnosticId>CP0002</DiagnosticId>
41+
<Target>M:MoreLinq.Experimental.ExperimentalEnumerable.AsUnordered``1(MoreLinq.Experimental.IAwaitQuery{``0})</Target>
42+
<Left>lib/net451/MoreLinq.dll</Left>
43+
<Right>lib/netstandard1.0/MoreLinq.dll</Right>
44+
<IsBaselineSuppression>true</IsBaselineSuppression>
45+
</Suppression>
46+
<Suppression>
47+
<DiagnosticId>CP0002</DiagnosticId>
48+
<Target>M:MoreLinq.Experimental.ExperimentalEnumerable.Await``1(System.Collections.Generic.IEnumerable{System.Threading.Tasks.Task{``0}})</Target>
49+
<Left>lib/net451/MoreLinq.dll</Left>
50+
<Right>lib/netstandard1.0/MoreLinq.dll</Right>
51+
<IsBaselineSuppression>true</IsBaselineSuppression>
52+
</Suppression>
53+
<Suppression>
54+
<DiagnosticId>CP0002</DiagnosticId>
55+
<Target>M:MoreLinq.Experimental.ExperimentalEnumerable.Await``2(System.Collections.Generic.IEnumerable{``0},System.Func{``0,System.Threading.CancellationToken,System.Threading.Tasks.Task{``1}})</Target>
56+
<Left>lib/net451/MoreLinq.dll</Left>
57+
<Right>lib/netstandard1.0/MoreLinq.dll</Right>
58+
<IsBaselineSuppression>true</IsBaselineSuppression>
59+
</Suppression>
60+
<Suppression>
61+
<DiagnosticId>CP0002</DiagnosticId>
62+
<Target>M:MoreLinq.Experimental.ExperimentalEnumerable.AwaitCompletion``3(System.Collections.Generic.IEnumerable{``0},System.Func{``0,System.Threading.CancellationToken,System.Threading.Tasks.Task{``1}},System.Func{``0,System.Threading.Tasks.Task{``1},``2})</Target>
63+
<Left>lib/net451/MoreLinq.dll</Left>
64+
<Right>lib/netstandard1.0/MoreLinq.dll</Right>
65+
<IsBaselineSuppression>true</IsBaselineSuppression>
66+
</Suppression>
67+
<Suppression>
68+
<DiagnosticId>CP0002</DiagnosticId>
69+
<Target>M:MoreLinq.Experimental.ExperimentalEnumerable.MaxConcurrency``1(MoreLinq.Experimental.IAwaitQuery{``0},System.Int32)</Target>
70+
<Left>lib/net451/MoreLinq.dll</Left>
71+
<Right>lib/netstandard1.0/MoreLinq.dll</Right>
72+
<IsBaselineSuppression>true</IsBaselineSuppression>
73+
</Suppression>
74+
<Suppression>
75+
<DiagnosticId>CP0002</DiagnosticId>
76+
<Target>M:MoreLinq.Experimental.ExperimentalEnumerable.PreserveOrder``1(MoreLinq.Experimental.IAwaitQuery{``0},System.Boolean)</Target>
77+
<Left>lib/net451/MoreLinq.dll</Left>
78+
<Right>lib/netstandard1.0/MoreLinq.dll</Right>
79+
<IsBaselineSuppression>true</IsBaselineSuppression>
80+
</Suppression>
81+
<Suppression>
82+
<DiagnosticId>CP0002</DiagnosticId>
83+
<Target>M:MoreLinq.Experimental.ExperimentalEnumerable.Scheduler``1(MoreLinq.Experimental.IAwaitQuery{``0},System.Threading.Tasks.TaskScheduler)</Target>
84+
<Left>lib/net451/MoreLinq.dll</Left>
85+
<Right>lib/netstandard1.0/MoreLinq.dll</Right>
86+
<IsBaselineSuppression>true</IsBaselineSuppression>
87+
</Suppression>
88+
<Suppression>
89+
<DiagnosticId>CP0002</DiagnosticId>
90+
<Target>M:MoreLinq.Experimental.ExperimentalEnumerable.UnboundedConcurrency``1(MoreLinq.Experimental.IAwaitQuery{``0})</Target>
91+
<Left>lib/net451/MoreLinq.dll</Left>
92+
<Right>lib/netstandard1.0/MoreLinq.dll</Right>
93+
<IsBaselineSuppression>true</IsBaselineSuppression>
94+
</Suppression>
95+
<Suppression>
96+
<DiagnosticId>CP0002</DiagnosticId>
97+
<Target>M:MoreLinq.MoreEnumerable.ToDataTable``1(System.Collections.Generic.IEnumerable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Object}}[])</Target>
98+
<Left>lib/net451/MoreLinq.dll</Left>
99+
<Right>lib/netstandard1.0/MoreLinq.dll</Right>
100+
<IsBaselineSuppression>true</IsBaselineSuppression>
101+
</Suppression>
102+
<Suppression>
103+
<DiagnosticId>CP0002</DiagnosticId>
104+
<Target>M:MoreLinq.MoreEnumerable.ToDataTable``1(System.Collections.Generic.IEnumerable{``0})</Target>
105+
<Left>lib/net451/MoreLinq.dll</Left>
106+
<Right>lib/netstandard1.0/MoreLinq.dll</Right>
107+
<IsBaselineSuppression>true</IsBaselineSuppression>
108+
</Suppression>
109+
<Suppression>
110+
<DiagnosticId>CP0002</DiagnosticId>
111+
<Target>M:MoreLinq.MoreEnumerable.ToDataTable``2(System.Collections.Generic.IEnumerable{``0},``1,System.Linq.Expressions.Expression{System.Func{``0,System.Object}}[])</Target>
112+
<Left>lib/net451/MoreLinq.dll</Left>
113+
<Right>lib/netstandard1.0/MoreLinq.dll</Right>
114+
<IsBaselineSuppression>true</IsBaselineSuppression>
115+
</Suppression>
116+
<Suppression>
117+
<DiagnosticId>CP0002</DiagnosticId>
118+
<Target>M:MoreLinq.MoreEnumerable.ToDataTable``2(System.Collections.Generic.IEnumerable{``0},``1)</Target>
119+
<Left>lib/net451/MoreLinq.dll</Left>
120+
<Right>lib/netstandard1.0/MoreLinq.dll</Right>
121+
<IsBaselineSuppression>true</IsBaselineSuppression>
122+
</Suppression>
123+
<Suppression>
124+
<DiagnosticId>CP0002</DiagnosticId>
125+
<Target>M:MoreLinq.SequenceException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)</Target>
126+
<Left>lib/net451/MoreLinq.dll</Left>
127+
<Right>lib/netstandard1.0/MoreLinq.dll</Right>
128+
<IsBaselineSuppression>true</IsBaselineSuppression>
129+
</Suppression>
130+
</Suppressions>

MoreLinq/MoreLinq.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@
134134
<PackageLicenseFile>COPYING.txt</PackageLicenseFile>
135135
<PackageOutputPath>..\dist</PackageOutputPath>
136136
<PackageReadmeFile>README.md</PackageReadmeFile>
137+
<EnablePackageValidation>true</EnablePackageValidation>
138+
<PackageValidationBaselineVersion>3.3.1</PackageValidationBaselineVersion>
137139
<IncludeSymbols>true</IncludeSymbols>
138140
<IncludeSource>true</IncludeSource>
139141
<PublishRepositoryUrl>true</PublishRepositoryUrl>

appveyor.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@ after_build:
8383
if ($LASTEXITCODE -ne 0) {
8484
throw "New code was generated during build that's not been committed."
8585
}
86+
- ps: |
87+
dir dist\*.nupkg | % {
88+
dotnet meziantou.validate-nuget-package --excluded-rules IconMustBeSet,Symbols $_
89+
if ($LASTEXITCODE) {
90+
throw "Package validation failed: $_"
91+
}
92+
}
8693
test_script:
8794
- cmd: test.cmd
8895
- sh: ./test.sh

0 commit comments

Comments
 (0)