Skip to content

Commit

Permalink
Merge pull request #1 from snovak7/main
Browse files Browse the repository at this point in the history
Preparations for release v0.1.0
  • Loading branch information
snovak7 authored Apr 14, 2023
2 parents f062d95 + 86ceb0d commit fc067c6
Show file tree
Hide file tree
Showing 15 changed files with 599 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[*]
charset = utf-8
insert_final_newline = true
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: dotnet build

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: [ '7.0.x' ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore .NET Packages
run: dotnet restore
- name: Build .NET Solution
run: dotnet build --configuration Release --no-restore
- name: Pack .NET Solution
run: dotnet pack --no-build --output pack/
- name: Publish .NET Solution to GitHub Packages
continue-on-error: true
run: dotnet nuget push pack/* --api-key ${{ secrets.GITHUB_TOKEN }} --source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
- name: Publish .NET Solution to NuGet.org
continue-on-error: true
run: dotnet nuget push pack/* --api-key ${{ secrets.NUGET_ORG_KEY }} --source nuget

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -348,3 +348,6 @@ MigrationBackup/

# Ionide (cross platform F# VS Code tools) working folder
.ionide/

# JetBrains
.idea/
7 changes: 7 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/escendit/Escendit.Tools.CodeAnalysis.StyleCopAnalyzers</RepositoryUrl>
</PropertyGroup>
</Project>
13 changes: 13 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ItemGroup>
<PackageReference Include="Escendit.Tools.Branding" Version="1.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="GitVersion.MsBuild" Version="5.12.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
27 changes: 27 additions & 0 deletions Escendit.Tools.CodeAnalysis.StyleCopAnalyzers.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A7ECE722-6B13-46DD-BBD2-0BB0DD14D725}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Escendit.Tools.CodeAnalysis.StyleCopAnalyzers", "src\Escendit.Tools.CodeAnalysis.StyleCopAnalyzers\Escendit.Tools.CodeAnalysis.StyleCopAnalyzers.csproj", "{68B6D864-A601-4248-B0AB-BC7047246A62}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{68B6D864-A601-4248-B0AB-BC7047246A62} = {A7ECE722-6B13-46DD-BBD2-0BB0DD14D725}
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{68B6D864-A601-4248-B0AB-BC7047246A62}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{68B6D864-A601-4248-B0AB-BC7047246A62}.Debug|Any CPU.Build.0 = Debug|Any CPU
{68B6D864-A601-4248-B0AB-BC7047246A62}.Release|Any CPU.ActiveCfg = Release|Any CPU
{68B6D864-A601-4248-B0AB-BC7047246A62}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
4 changes: 4 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
branches:
master:
mode: ContinuousDeployment
tag: rc
244 changes: 242 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,242 @@
# Escendit.Tools.CodeAnalysis.StyleCopAnalyzers
StyleCop Analyzers Defaults
# NuGet Package: Escendit.Tools.CodeAnalysis.StyleCopAnalyzers

This NuGet package leverages the power of StyleCop Analyzers
to enforce code quality standards that are tailored to the organization's specific needs.
By default,
the package uses a set of analyzer rules that have been configured to align with the organization's coding practices,
ensuring that our code is always compliant and maintainable.

Key features:

- Utilize Roslyn .NET Analyzers for powerful and customizable code analysis
- Defaults suited to the organization's coding practices
- Ensures code compliance and maintainability

## Installation
To install this package, use the NuGet Package Manager Console:

```shell
PM> Install-Package Escendit.Tools.CodeAnalysis.StyleCopAnalyzers
```
Or you can search for "Escendit.Tools.CodeAnalysis.StyleCopAnalyzers"
in the NuGet Package Manager UI and install it from there.

## Usage
After installing the package, the MSBuild and .editorconfig properties will be set automatically.
- You can modify the MSBuild properties by updating the values in your .csproj or .vbproj file.
- You can modify the .editorconfig properties by creating .editorconfig file and overriding the default values.

## Configuration

The NuGet package includes the following default rules and severity levels:


| Rule | Severity | Severity |
|----------|----------|----------|
| SA0001 | error ||
| SA0002 | error ||
| SA1000 | error ||
| SA1001 | error ||
| SA1002 | error ||
| SA1003 | error ||
| SA1004 | error ||
| SA1005 | error ||
| SA1006 | error ||
| SA1007 | error ||
| SA1008 | error ||
| SA1009 | error ||
| SA1010 | error ||
| SA1011 | error ||
| SA1012 | error ||
| SA1013 | error ||
| SA1014 | error ||
| SA1015 | error ||
| SA1016 | error ||
| SA1017 | error ||
| SA1018 | error ||
| SA1019 | error ||
| SA1020 | error ||
| SA1021 | error ||
| SA1022 | error ||
| SA1023 | error ||
| SA1024 | error ||
| SA1025 | error ||
| SA1026 | error ||
| SA1027 | error ||
| SA1028 | error ||
| SA1100 | error ||
| SA1101 | none ||
| SA1102 | error ||
| SA1103 | error ||
| SA1104 | error ||
| SA1105 | error ||
| SA1106 | error ||
| SA1107 | error ||
| SA1108 | error ||
| SA1110 | error ||
| SA1111 | error ||
| SA1112 | error ||
| SA1113 | error ||
| SA1114 | error ||
| SA1115 | error ||
| SA1116 | error ||
| SA1117 | error ||
| SA1118 | error ||
| SA1119 | error ||
| SA1120 | error ||
| SA1121 | error ||
| SA1122 | error ||
| SA1123 | error ||
| SA1124 | error ||
| SA1125 | error ||
| SA1127 | error ||
| SA1128 | error ||
| SA1129 | error ||
| SA1130 | error ||
| SA1131 | error ||
| SA1132 | error ||
| SA1133 | error ||
| SA1134 | error ||
| SA1135 | error ||
| SA1136 | error ||
| SA1137 | error ||
| SA1139 | error ||
| SA1141 | error ||
| SA1142 | error ||
| SA1200 | error ||
| SA1201 | error ||
| SA1202 | error ||
| SA1203 | error ||
| SA1204 | error ||
| SA1205 | error ||
| SA1206 | error ||
| SA1207 | error ||
| SA1208 | error ||
| SA1209 | error ||
| SA1210 | error ||
| SA1211 | error ||
| SA1212 | error ||
| SA1213 | error ||
| SA1214 | error ||
| SA1216 | error ||
| SA1217 | error ||
| SA1300 | none ||
| SA1302 | error ||
| SA1303 | error ||
| SA1304 | error ||
| SA1305 | error ||
| SA1306 | error ||
| SA1307 | error ||
| SA1308 | error ||
| SA1309 | none ||
| SA1310 | error ||
| SA1311 | error ||
| SA1312 | error ||
| SA1313 | error ||
| SA1314 | error ||
| SA1316 | error ||
| SA1400 | error ||
| SA1401 | error ||
| SA1402 | error ||
| SA1403 | error ||
| SA1404 | error ||
| SA1405 | error ||
| SA1406 | error ||
| SA1407 | error ||
| SA1408 | error ||
| SA1410 | error ||
| SA1411 | error ||
| SA1412 | error ||
| SA1413 | error ||
| SA1414 | error ||
| SA1500 | error ||
| SA1501 | error ||
| SA1502 | error ||
| SA1503 | error ||
| SA1504 | error ||
| SA1505 | error ||
| SA1506 | error ||
| SA1507 | error ||
| SA1508 | error ||
| SA1509 | error ||
| SA1510 | error ||
| SA1511 | error ||
| SA1512 | error ||
| SA1513 | error ||
| SA1514 | error ||
| SA1515 | error ||
| SA1516 | error ||
| SA1517 | error ||
| SA1518 | error ||
| SA1519 | error ||
| SA1520 | error ||
| SA1600 | error ||
| SA1601 | error ||
| SA1602 | error ||
| SA1604 | error ||
| SA1605 | error ||
| SA1606 | error ||
| SA1607 | error ||
| SA1608 | error ||
| SA1609 | error ||
| SA1610 | error ||
| SA1611 | error ||
| SA1612 | error ||
| SA1613 | error ||
| SA1614 | error ||
| SA1615 | error ||
| SA1616 | error ||
| SA1617 | error ||
| SA1618 | error ||
| SA1619 | error ||
| SA1620 | error ||
| SA1621 | error ||
| SA1622 | error ||
| SA1623 | error ||
| SA1624 | error ||
| SA1625 | error ||
| SA1626 | error ||
| SA1627 | error ||
| SA1628 | error ||
| SA1629 | error ||
| SA1633 | error ||
| SA1634 | error ||
| SA1635 | error ||
| SA1636 | error ||
| SA1637 | error ||
| SA1638 | error ||
| SA1639 | error ||
| SA1640 | error ||
| SA1641 | error ||
| SA1642 | error ||
| SA1643 | error ||
| SA1648 | error ||
| SA1649 | error ||
| SA1651 | error ||
| SX1101 | error ||
| SX1309 | error ||
| SX1309S | error ||


To modify the severity level of a rule, you can add the following code to your .editorconfig file:

```editorconfig
# dotnet_diagnostic.<Rule>.severity = <Severity>
```

For example, to change the severity level of `SA9999` to "error", add the following line to your .editorconfig file:

```editorconfig
# dotnet_diagnostic.SA9999.severity = error
```


## Contributing
If you find a bug or have a feature request, please create an issue in the GitHub repository.

To contribute code, fork the repository and submit a pull request.
Please ensure that your code follows the project's coding standards and is thoroughly tested.

## License
This package is released under the MIT License. See the LICENSE.txt file for details.

5 changes: 5 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"sdk": {
"version": "7.0.100"
}
}
7 changes: 7 additions & 0 deletions nuget.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<DevelopmentDependency>true</DevelopmentDependency>
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
<NoWarn>$(NoWarn);NU5128</NoWarn>
<IsPackable>true</IsPackable>
<IncludeBuildOutput>false</IncludeBuildOutput>
<PackageDescription>Enforce our coding practices in your projects with our NuGet package's default settings for Style Cop Analyzers.</PackageDescription>
<PackageTags>analyzers;stylecop;defaults</PackageTags>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.435">
<PrivateAssets>runtime; build; native; contentfiles</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<!-- TFM -->
<None Pack="true" PackagePath="build" Include="Escendit.Tools.CodeAnalysis.StyleCopAnalyzers.props" />
<None Pack="true" PackagePath="build" Include="Escendit.Tools.CodeAnalysis.StyleCopAnalyzers.targets" />
<!-- TFMs -->
<None Pack="true" PackagePath="buildMultiTargeting" Include="Escendit.Tools.CodeAnalysis.StyleCopAnalyzers.props" />
<None Pack="true" PackagePath="buildMultiTargeting" Include="Escendit.Tools.CodeAnalysis.StyleCopAnalyzers.targets" />
<!-- Transitive -->
<None Pack="true" PackagePath="buildTransitive" Include="Escendit.Tools.CodeAnalysis.StyleCopAnalyzers.props" />
<None Pack="true" PackagePath="buildTransitive" Include="Escendit.Tools.CodeAnalysis.StyleCopAnalyzers.targets" />
<!-- Assets -->
<None Pack="true" PackagePath="" Include="Escendit.Tools.CodeAnalysis.StyleCopAnalyzers.globalconfig" />
<None Pack="true" PackagePath="" Include="stylecop.json" />
<!-- README -->
<None Pack="true" PackagePath="" Include="$(SolutionDir)/README.md" />
</ItemGroup>
</Project>
Loading

0 comments on commit fc067c6

Please sign in to comment.