Skip to content

Commit fee51c2

Browse files
authored
feat: Added NetEvolve.Defaults.Analyzer project (#5)
* feat: Added `NetEvolve.Defaults.Analyzer` project with several diagnostics * chore: Add missing translations * docs: Updated package docs * docs: Added docs for NED0001 - NED0008 * docs: Updated titles
1 parent 4bdf90f commit fee51c2

23 files changed

+948
-1
lines changed

Defaults.sln

+7
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{DB9397A5
3131
EndProject
3232
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetEvolve.Defaults.Tests.Integration", "tests\NetEvolve.Defaults.Tests.Integration\NetEvolve.Defaults.Tests.Integration.csproj", "{7A7B8583-0494-496B-A63F-C0134194D633}"
3333
EndProject
34+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetEvolve.Defaults.Analyzer", "src\NetEvolve.Defaults.Analyzer\NetEvolve.Defaults.Analyzer.csproj", "{04A3A934-D585-42BD-B551-501F3ED99086}"
35+
EndProject
3436
Global
3537
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3638
Debug|Any CPU = Debug|Any CPU
@@ -48,9 +50,14 @@ Global
4850
{7A7B8583-0494-496B-A63F-C0134194D633}.Debug|Any CPU.Build.0 = Debug|Any CPU
4951
{7A7B8583-0494-496B-A63F-C0134194D633}.Release|Any CPU.ActiveCfg = Release|Any CPU
5052
{7A7B8583-0494-496B-A63F-C0134194D633}.Release|Any CPU.Build.0 = Release|Any CPU
53+
{04A3A934-D585-42BD-B551-501F3ED99086}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
54+
{04A3A934-D585-42BD-B551-501F3ED99086}.Debug|Any CPU.Build.0 = Debug|Any CPU
55+
{04A3A934-D585-42BD-B551-501F3ED99086}.Release|Any CPU.ActiveCfg = Release|Any CPU
56+
{04A3A934-D585-42BD-B551-501F3ED99086}.Release|Any CPU.Build.0 = Release|Any CPU
5157
EndGlobalSection
5258
GlobalSection(NestedProjects) = preSolution
5359
{C9525AC4-A52E-4D52-A9A4-389D9FF6A1CE} = {4AD0D117-4F9D-4288-B0F9-D8C1C120B5E4}
5460
{7A7B8583-0494-496B-A63F-C0134194D633} = {DB9397A5-7522-4CF5-B402-E4FFC93E600B}
61+
{04A3A934-D585-42BD-B551-501F3ED99086} = {4AD0D117-4F9D-4288-B0F9-D8C1C120B5E4}
5562
EndGlobalSection
5663
EndGlobal

Directory.Packages.props

+9-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
55
</PropertyGroup>
66
<ItemGroup>
7-
<GlobalPackageReference Include="GitVersion.MsBuild" Version="6.0.3" />
7+
<GlobalPackageReference Include="CSharpier.MSBuild" Version="0.30.1" />
8+
<GlobalPackageReference Include="GitVersion.MsBuild" Version="6.0.5" />
9+
<GlobalPackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.4" />
10+
<GlobalPackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0" />
11+
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
12+
<GlobalPackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.12.19" />
813
</ItemGroup>
914
<ItemGroup>
1015
<PackageVersion Include="coverlet.collector" Version="6.0.2">
@@ -15,6 +20,9 @@
1520
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1621
<PrivateAssets>all</PrivateAssets>
1722
</PackageVersion>
23+
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" />
24+
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.11.0" />
25+
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" />
1826
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
1927
<PackageVersion Include="NetEvolve.Extensions.XUnit" Version="2.3.1" />
2028
<PackageVersion Include="xunit" Version="2.9.2" />

docs/usage/NED0001.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Project configuration warning NED0001
2+
3+
The project file is missing or has an incomplete configuration for the `<PackageId />` tag. This tag is crucial as it uniquely identifies the package within the project, ensuring proper management and deployment. Without a valid `<PackageId />`, the build process may fail, leading to potential issues in package restoration and versioning.
4+
5+
To resolve this issue, please follow these steps:
6+
7+
- Open the Project File: Locate and open your project file (e.g., `.csproj` for C# projects).
8+
9+
- Add or Update the `<PackageId />` Tag: Ensure that the `<PackageId />` tag is present and correctly formatted.
10+
11+
It should look like this:
12+
```xml
13+
<PackageId>Your.Package.Id</PackageId>
14+
```
15+
16+
- Validate the Configuration: After making changes, validate the project file to ensure there are no syntax errors.
17+
18+
- Rebuild the Project: Once the configuration is corrected, rebuild your project to confirm that the issue is resolved.
19+
20+
If you continue to experience problems, consider checking the documentation for your specific project type or reaching out to your development team for further assistance. Proper configuration of the `<PackageId />` tag is essential for maintaining a smooth development workflow.

docs/usage/NED0002.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Project configuration warning NED0002
2+
3+
The project file is missing or has an incomplete configuration for the `<Title />` tag. This tag is essential as it defines the display name of your project, which is used in various contexts, including package management and user interfaces. An incomplete or absent `<Title />` can lead to confusion during deployment and may affect how users perceive your project.
4+
5+
To resolve this issue, please follow these steps:
6+
7+
- Open the Project File: Locate and open your project file (e.g., `.csproj` for C# projects).
8+
9+
- Add or Update the `<Title />` Tag: Ensure that the `<Title />` tag is present and correctly formatted.
10+
11+
It should look like this:
12+
```xml
13+
<Title>Your Project Title</Title>
14+
```
15+
16+
- Validate the Configuration: After making changes, validate the project file to ensure there are no syntax errors.
17+
18+
- Rebuild the Project: Once the configuration is corrected, rebuild your project to confirm that the issue is resolved.
19+
20+
If you continue to experience problems, consider checking the documentation for your specific project type or reaching out to your development team for further assistance. Proper configuration of the `<Title />` tag is essential for maintaining a smooth development workflow.

docs/usage/NED0003.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Project configuration warning NED0003
2+
3+
The project file is missing or has an incomplete configuration for the `<Description />` tag. This tag is important as it provides a brief overview of your project, helping users and developers understand its purpose and functionality. An incomplete or absent `<Description />` can lead to misunderstandings about the project’s goals and may hinder effective collaboration.
4+
5+
To resolve this issue, please follow these steps:
6+
7+
- Open the Project File: Locate and open your project file (e.g., `.csproj` for C# projects).
8+
9+
- Add or Update the `<Description />` Tag: Ensure that the `<Description />` tag is present and correctly formatted.
10+
11+
It should look like this:
12+
```xml
13+
<Description>Your project description here.</Description>
14+
```
15+
16+
- Validate the Configuration: After making changes, validate the project file to ensure there are no syntax errors.
17+
18+
- Rebuild the Project: Once the configuration is corrected, rebuild your project to confirm that the issue is resolved.
19+
20+
If you continue to experience problems, consider checking the documentation for your specific project type or reaching out to your development team for further assistance. Proper configuration of the `<Description />` tag is essential for providing clear information about your project.

docs/usage/NED0004.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Project configuration warning NED0004
2+
3+
The project file is missing or has an incomplete configuration for the `<PackageTags />` tag. This tag is essential for categorizing your package and improving its discoverability in package repositories. Without a properly configured `<PackageTags />`, users may find it challenging to locate your project, which can impact its adoption and usage.
4+
5+
To resolve this issue, please follow these steps:
6+
7+
- Open the Project File: Locate and open your project file (e.g., `.csproj` for C# projects).
8+
9+
- Add or Update the `<PackageTags />` Tag: Ensure that the `<PackageTags />` tag is present and correctly formatted.
10+
11+
It should look like this:
12+
```xml
13+
<PackageTags>your;tags;here</PackageTags>
14+
```
15+
16+
- Validate the Configuration: After making changes, validate the project file to ensure there are no syntax errors.
17+
18+
- Rebuild the Project: Once the configuration is corrected, rebuild your project to confirm that the issue is resolved.
19+
20+
If you continue to experience problems, consider checking the documentation for your specific project type or reaching out to your development team for further assistance. Proper configuration of the `<PackageTags />` tag is essential for enhancing the visibility and accessibility of your project.

docs/usage/NED0005.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Project configuration warning NED0005
2+
3+
The project file is missing or has an incomplete configuration for the `<PackageProjectUrl />` tag. This tag is vital as it specifies the URL for the project’s homepage or repository, allowing users to easily find more information, documentation, or source code. An incomplete or absent `<PackageProjectUrl />` can hinder user engagement and limit the project’s visibility.
4+
5+
To resolve this issue, please follow these steps:
6+
7+
- Open the Project File: Locate and open your project file (e.g., `.csproj` for C# projects).
8+
9+
- Add or Update the `<PackageProjectUrl />` Tag: Ensure that the `<PackageProjectUrl />` tag is present and correctly formatted.
10+
11+
It should look like this:
12+
```xml
13+
<PackageProjectUrl>https://your-project-url.com</PackageProjectUrl>
14+
```
15+
16+
- Validate the Configuration: After making changes, validate the project file to ensure there are no syntax errors.
17+
18+
- Rebuild the Project: Once the configuration is corrected, rebuild your project to confirm that the issue is resolved.
19+
20+
If you continue to experience problems, consider checking the documentation for your specific project type or reaching out to your development team for further assistance. Proper configuration of the `<PackageProjectUrl />` tag is essential for directing users to your project’s homepage or repository.

docs/usage/NED0006.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Project configuration warning NED0006
2+
3+
The project file is missing or has an incomplete configuration for the `<RepositoryUrl />` tag. This tag is crucial as it specifies the URL of the project’s source code repository, enabling users and contributors to access the codebase, report issues, and contribute to development. An incomplete or absent `<RepositoryUrl />` can limit collaboration and hinder user engagement.
4+
5+
To resolve this issue, please follow these steps:
6+
7+
- Open the Project File: Locate and open your project file (e.g., `.csproj` for C# projects).
8+
9+
- Add or Update the `<RepositoryUrl />` Tag: Ensure that the `<RepositoryUrl />` tag is present and correctly formatted.
10+
11+
It should look like this:
12+
```xml
13+
<RepositoryUrl>https://your-repository-url.com/repository.git</RepositoryUrl>
14+
```
15+
16+
- Validate the Configuration: After making changes, validate the project file to ensure there are no syntax errors.
17+
18+
- Rebuild the Project: Once the configuration is corrected, rebuild your project to confirm that the issue is resolved.
19+
20+
If you continue to experience problems, consider checking the documentation for your specific project type or reaching out to your development team for further assistance. Proper configuration of the `<RepositoryUrl />` tag is essential for providing access to your project’s source code repository.

docs/usage/NED0007.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Project configuration warning NED0007
2+
3+
The project file is missing or has an incomplete configuration for the `<Authors />` tag. This tag is essential as it specifies the authors of the project, providing credit and context for contributions. An incomplete or absent `<Authors />` tag can lead to confusion about authorship and may affect collaboration and recognition within the community.
4+
5+
To resolve this issue, please follow these steps:
6+
7+
- Open the Project File: Locate and open your project file (e.g., `.csproj` for C# projects).
8+
9+
- Add or Update the `<Authors />` Tag: Ensure that the `<Authors />` tag is present and correctly formatted.
10+
11+
It should look like this:
12+
```xml
13+
<Authors>Your Name</Authors>
14+
```
15+
16+
- Validate the Configuration: After making changes, validate the project file to ensure there are no syntax errors.
17+
18+
- Rebuild the Project: Once the configuration is corrected, rebuild your project to confirm that the issue is resolved.
19+
20+
If you continue to experience problems, consider checking the documentation for your specific project type or reaching out to your development team for further assistance. Proper configuration of the `<Authors />` tag is essential for providing credit and context for project contributions.

docs/usage/NED0008.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Project configuration warning NED0008
2+
3+
The project file is missing or has an incomplete configuration for the `<Company />` tag. This tag is important as it specifies the name of the company or organization responsible for the project. An incomplete or absent `<Company />` tag can lead to confusion regarding ownership and may affect branding and recognition in the community.
4+
5+
To resolve this issue, please follow these steps:
6+
7+
- Open the Project File: Locate and open your project file (e.g., `.csproj` for C# projects).
8+
9+
- Add or Update the `<Company />` Tag: Ensure that the `<Company />` tag is present and correctly formatted.
10+
11+
It should look like this:
12+
```xml
13+
<Company>Your Company Name</Company>
14+
```
15+
16+
- Validate the Configuration: After making changes, validate the project file to ensure there are no syntax errors.
17+
18+
- Rebuild the Project: Once the configuration is corrected, rebuild your project to confirm that the issue is resolved.
19+
20+
If you continue to experience problems, consider checking the documentation for your specific project type or reaching out to your development team for further assistance. Proper configuration of the `<Company />` tag is essential for specifying the organization responsible for the project.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
; Shipped analyzer releases
2+
; https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md
3+
4+
## Release 1.0
5+
6+
### New Rules
7+
8+
Rule ID | Category | Severity | Notes
9+
--------|----------|----------|-------
10+
NED0001 | Usage | Warning | The project file is missing or has an incomplete configuration for the <PackageId /> tag. This tag is crucial as it uniquely identifies the package within the project, ensuring proper management and deployment. Without a valid <PackageId />, the build process may fail, leading to potential issues in package restoration and versioning.
11+
NED0002 | Usage | Warning | The project file is missing or has an incomplete configuration for the <Title /> tag. This tag is essential as it defines the display name of your project, which is used in various contexts, including package management and user interfaces. An incomplete or absent <Title /> can lead to confusion during deployment and may affect how users perceive your project.
12+
NED0003 | Usage | Warning | The project file is missing or has an incomplete configuration for the <Description /> tag. This tag is important as it provides a brief overview of your project, helping users and developers understand its purpose and functionality. An incomplete or absent <Description /> can lead to misunderstandings about the project’s goals and may hinder effective collaboration.
13+
NED0004 | Usage | Warning | The project file is missing or has an incomplete configuration for the <PackageTags /> tag. This tag is essential for categorizing your package and improving its discoverability in package repositories. Without a properly configured <PackageTags />, users may find it challenging to locate your project, which can impact its adoption and usage.
14+
NED0005 | Usage | Warning | The project file is missing or has an incomplete configuration for the <PackageProjectUrl /> tag. This tag is vital as it specifies the URL for the project’s homepage or repository, allowing users to easily find more information, documentation, or source code. An incomplete or absent <PackageProjectUrl /> can hinder user engagement and limit the project’s visibility.
15+
NED0006 | Usage | Warning | The project file is missing or has an incomplete configuration for the <RepositoryUrl /> tag. This tag is crucial as it specifies the URL of the project’s source code repository, enabling users and contributors to access the codebase, report issues, and contribute to development. An incomplete or absent <RepositoryUrl /> can limit collaboration and hinder user engagement.
16+
NED0007 | Usage | Warning | The project file is missing or has an incomplete configuration for the <Authors /> tag. This tag is essential as it specifies the authors of the project, providing credit and context for contributions. An incomplete or absent <Authors /> tag can lead to confusion about authorship and may affect collaboration and recognition within the community.
17+
NED0008 | Usage | Warning | The project file is missing or has an incomplete configuration for the <Company /> tag. This tag is important as it specifies the name of the company or organization responsible for the project. An incomplete or absent <Company /> tag can lead to confusion regarding ownership and may affect branding and recognition in the community.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
; Unshipped analyzer release
2+
; https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md

0 commit comments

Comments
 (0)