Analyzing your Mod
Here's a list of analyzer diagnostics.
Here's a list of analyzer diagnostics.
Analyzers, in .NET, are tools that allow you to check the quality of your code and to fix common design pitfalls in your code. These fixes typically tailor the use of better features or the removal of unnecessary code.
Similarly, we provide you with analyzers that detect the usage of non-Nitrocid methods and classes and provide you fixes that make use of Nitrocid methods and classes as good alternatives. These analyzers are applicable only to Nitrocid mods.
We provide you two types of analyzers for your Nitrocid mods:
NuGet-based analyzers: They analyze your mods while you're working on them in .NET IDEs.
Standalone analyzers: They analyze your mod code outside Visual Studio.
In this page, we'll give you instructions on how to install such analyzers. Choose the analyzer type based on your preferences.
There are two types of Nitrocid analyzers as highlighted above. This section shows you how to analyze your code with either the NuGet analyzer package or the standalone analyzer. The mod analyzer package found in the release contains both the standalone analyzer and the NuGet-based analyzer.
In order to install the NuGet-based analyzer for Nitrocid mods on Visual Studio, follow the below steps:
Open Visual Studio 2022 to a solution of your choice and open Manage NuGet packages
on a project you want to analyze.
Search for Nitrocid.Analyzers
Install the package
Start working on your mod, and you'll see NKS
analyzers.
In case you can't use NuGet-based analyzer for your mods, you can use the standalone analyzer. To use it, follow the steps:
Open the command prompt
Go to the directory where the standalone analyzer is located. Use cd
to change the directory.
Run dotnet Nitrocid.StandaloneAnalyzer.dll path/to/mod.sln
The following code analyzers are shipped, with links to each page:
Currently, there are no analyzers which generate errors yet. However, we'll plan to add more analyzers.
It's vital to follow the analyzer recommendations to get the best mod code according to the standards.
Diag. ID | Page |
---|---|
Diag. ID | Page |
---|---|
NKS0001
NKS0002
NKS0003
NKS0004
NKS0005
NKS0006
NKS0007
NKS0008
NKS0009
NKS0010
NKS0011
NKS0012
NKS0013
NKS0014
NKS0015
NKS0016
NKS0017
NKS0018
NKS0019
NKS0020
NKS0021
NKS0022
NKS0023
NKS0024
NKS0025
NKS0026
NKS0027
NKS0031
NKS0032
NKS0033
NKS0037
NKS0038
NKS0039
NKS0040
NKS0041
NKS0042
NKS0043
NKS0052
NKS0053
NKS0044
NKS0045
NKS0046
NKS0051
NKS0047
NKS0048
NKS0049
NKS0050
NKS0054
NKS0055