Chaws.DotNet.CodingStandards 1.0.2

dotnet add package Chaws.DotNet.CodingStandards --version 1.0.2                
NuGet\Install-Package Chaws.DotNet.CodingStandards -Version 1.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Chaws.DotNet.CodingStandards" Version="1.0.2">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Chaws.DotNet.CodingStandards --version 1.0.2                
#r "nuget: Chaws.DotNet.CodingStandards, 1.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Chaws.DotNet.CodingStandards as a Cake Addin
#addin nuget:?package=Chaws.DotNet.CodingStandards&version=1.0.2

// Install Chaws.DotNet.CodingStandards as a Cake Tool
#tool nuget:?package=Chaws.DotNet.CodingStandards&version=1.0.2                

Chaws' Coding Standards

This repo is a place for me to keep all my shared configuration between projects in one place. These configurations are very opinionated to fit the way I like to work.

Since this is an internal tool for my personal projects, new features will be enabled by default and versioning will not follow semver.

Usage


<Project>

	
	<PropertyGroup>
		
		<Product>My Awesome Project</Product>

		
		<Authors>Christopher.Haws</Authors>

		
		<CopyrightHolder>Christopher Haws</CopyrightHolder>
	</PropertyGroup>

	
	<PropertyGroup>
		
		<Company>Contoso</Company>

		
		<Company>Contoso</Company>
	</PropertyGroup>

</Project>

Roadmap

  • - Add logging to log changed features (toggleable)
  • - Add the ability to build containers via EnableSdkContainerSupport
  • - Look into if it is possible to detect installed packages and enable/disable features based on that
  • - Add tests to validate that everything works (could use Buildalyzer)

Features

Reproducible Builds

License Nuget GitHub Stars

These packages are used to:

  • keep builds idempotent
  • sets a bunch of properties based on the CI pipeline you use to help keep your builds consistent across platforms
  • sets up SourceLink on your build to make it easier to debug into your project's source code
  • prevents the build from unintentionally depending on other installed software that's not described by your repo
  • other cool things! Go check out their github for more info! 😃

Preconfigured Static Analysis

I like to live on the edge in my personal projects so I have the analysis level set to preview. If you prefer to set the level to something else, you can do so by setting this value yourself:

<PropertyGroup>
	<AnalysisLevel>latest</AnalysisLevel>
<PropertyGroup>
Microsoft.VisualStudio.Threading.Analyzers

License Nuget GitHub Stars

Microsoft.CodeAnalysis.PublicApiAnalyzers

License Nuget GitHub Stars

This package contains rules to help library authors monitoring change to their public APIs.

Microsoft.CodeAnalysis.BannedApiAnalyzers

License Nuget GitHub Stars

Purpose Allows banning the use of arbitrary code using a txt file.

Relavent Files BannedSymbolsFile

Disable

<PropertyGroup>
	<IncludeDefaultBannedSymbols>false</IncludeDefaultBannedSymbols>
</PropertyGroup>
Microsoft.CodeAnalysis.NetAnalyzers

License Nuget GitHub Stars

This is the default analyzer that ships with .NET. Including it manually means we will get updates without needing to update .NET.

Nullable.Extended.Analyzer

License Nuget GitHub Stars

Disable

<PropertyGroup>
	<DisableNullableExtendedAnalyzer>true</DisableNullableExtendedAnalyzer>
</PropertyGroup>
Meziantou.Analyzer

License Nuget GitHub Stars

JetBrains Annotations

This meta package adds JetBrains.Annotations and adds it's namespace to the implicit usings.

Access internal types with UnitTests

This package allows you to access internal types in tests as long as you name your test project {ProjectName}.Tests

Access internal types with LINQPad durring development

I use LINQPad a lot during development for prototyping and experimenting. Being able to reference my assemplies and use the internal types is very handy!

Building

nuget pack Chaws.DotNet.CodingStandards.nuspec -ForceEnglishOutput -Version 1.0.0

Build-in SDK Properties and Items

References

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 208 4/19/2023
1.0.1 225 3/25/2023
1.0.0 213 3/21/2023