---
description: Here's a list of analyzer diagnostics.
---

# Analyzing your Mod

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:

* **Visual Studio-based analyzers**: They analyze your mods while you're working on them in Visual Studio.
* **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.

## Installation

There are two types of Nitrocid analyzers as highlighted above. This section shows you how to analyze your code with either Visual Studio and the standalone analyzer. The mod analyzer package found in the release contains both the standalone analyzer and the Visual Studio-based analyzer.

### Visual Studio

In order to install the Visual Studio-based analyzer for Nitrocid mods, follow the below steps:

1. Open Visual Studio 2022 and open `Extensions` > `Manage Extensions...`.
2.  Search for `Aptivi.NKSAnalyzers`

    <figure><img src="https://979265983-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKBgZy6xqjdYb7KIbxI6u%2Fuploads%2Fgit-blob-1082335217697163fc1afee3eb7d0708f5d4d7a9%2F091-modanalyzers.png?alt=media" alt=""><figcaption></figcaption></figure>
3.  Once it gets downloaded, close all Visual Studio windows until this window appears

    <figure><img src="https://979265983-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKBgZy6xqjdYb7KIbxI6u%2Fuploads%2Fgit-blob-09889d203fc8a69f3136e9f8035f4fcf05a4a8a0%2Fimage%20(80).png?alt=media" alt=""><figcaption></figcaption></figure>
4.  Click on Modify and wait until this window shows up

    <figure><img src="https://979265983-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKBgZy6xqjdYb7KIbxI6u%2Fuploads%2Fgit-blob-f55640fd103857a3e26a61e16b1c3ea337a7e991%2Fimage%20(81).png?alt=media" alt=""><figcaption></figcaption></figure>
5.  Start working on your mod, and you'll see `NKS` analyzers.\\

    <figure><img src="https://979265983-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKBgZy6xqjdYb7KIbxI6u%2Fuploads%2Fgit-blob-eaaea2006691dbfa3cdba5a4580c483cab72350a%2F093-modanalyzers.png?alt=media" alt=""><figcaption></figcaption></figure>

### Standalone Analyzer

In case you can't use Visual Studio-based analyzer for your mods, you can use the standalone analyzer. To use it, follow the steps:

1. Open the command prompt
2. Go to the directory where the standalone analyzer is located. Use `cd` to change the directory.
3.  Run `dotnet Nitrocid.StandaloneAnalyzer.dll path/to/mod.sln`\\

    <figure><img src="https://979265983-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKBgZy6xqjdYb7KIbxI6u%2Fuploads%2Fgit-blob-c59ca5e41ecdcdb9a2bb2496acc68a1dd9982e91%2F094-modanalyzers.png?alt=media" alt=""><figcaption></figcaption></figure>

## Diagnostics

The following code analyzers are shipped, with links to each page:

{% tabs %}
{% tab title="Errors" %}
Currently, there are no analyzers which generate errors yet. However, we'll plan to add more analyzers.
{% endtab %}

{% tab title="Warnings" %}
The following analyzers generate warnings:

<table><thead><tr><th width="140">Diag. ID</th><th data-type="content-ref">Page</th></tr></thead><tbody><tr><td><code>NKS0001</code></td><td><a href="analyzer-diagnostics/text-nks0001">text-nks0001</a></td></tr><tr><td><code>NKS0002</code></td><td><a href="analyzer-diagnostics/consolebase-nks0002">consolebase-nks0002</a></td></tr><tr><td><code>NKS0003</code></td><td><a href="analyzer-diagnostics/consolebase-nks0003">consolebase-nks0003</a></td></tr></tbody></table>
{% endtab %}

{% tab title="Suggestions" %}
The following analyzers generate suggestions that are shown under the Messages section of the Errors List on your Visual Studio:

<table><thead><tr><th width="140">Diag. ID</th><th data-type="content-ref">Page</th></tr></thead><tbody><tr><td><code>NKS0004</code></td><td><a href="analyzer-diagnostics/consolebase-nks0004">consolebase-nks0004</a></td></tr><tr><td><code>NKS0005</code></td><td><a href="analyzer-diagnostics/consolebase-nks0005">consolebase-nks0005</a></td></tr><tr><td><code>NKS0006</code></td><td><a href="analyzer-diagnostics/consolebase-nks0006">consolebase-nks0006</a></td></tr><tr><td><code>NKS0007</code></td><td><a href="analyzer-diagnostics/consolebase-nks0007">consolebase-nks0007</a></td></tr><tr><td><code>NKS0008</code></td><td><a href="analyzer-diagnostics/consolebase-nks0008">consolebase-nks0008</a></td></tr><tr><td><code>NKS0009</code></td><td><a href="analyzer-diagnostics/consolebase-nks0009">consolebase-nks0009</a></td></tr><tr><td><code>NKS0010</code></td><td><a href="analyzer-diagnostics/files-nks0010">files-nks0010</a></td></tr><tr><td><code>NKS0011</code></td><td><a href="analyzer-diagnostics/files-nks0011">files-nks0011</a></td></tr><tr><td><code>NKS0012</code></td><td><a href="analyzer-diagnostics/files-nks0012">files-nks0012</a></td></tr><tr><td><code>NKS0013</code></td><td><a href="analyzer-diagnostics/files-nks0013">files-nks0013</a></td></tr><tr><td><code>NKS0014</code></td><td><a href="analyzer-diagnostics/files-nks0014">files-nks0014</a></td></tr><tr><td><code>NKS0015</code></td><td><a href="analyzer-diagnostics/files-nks0015">files-nks0015</a></td></tr><tr><td><code>NKS0016</code></td><td><a href="analyzer-diagnostics/files-nks0016">files-nks0016</a></td></tr><tr><td><code>NKS0017</code></td><td><a href="analyzer-diagnostics/files-nks0017">files-nks0017</a></td></tr><tr><td><code>NKS0018</code></td><td><a href="analyzer-diagnostics/files-nks0018">files-nks0018</a></td></tr><tr><td><code>NKS0019</code></td><td><a href="analyzer-diagnostics/files-nks0019">files-nks0019</a></td></tr><tr><td><code>NKS0020</code></td><td><a href="analyzer-diagnostics/files-nks0020">files-nks0020</a></td></tr><tr><td><code>NKS0021</code></td><td><a href="analyzer-diagnostics/files-nks0021">files-nks0021</a></td></tr><tr><td><code>NKS0022</code></td><td><a href="analyzer-diagnostics/files-nks0022">files-nks0022</a></td></tr><tr><td><code>NKS0023</code></td><td><a href="analyzer-diagnostics/files-nks0023">files-nks0023</a></td></tr><tr><td><code>NKS0024</code></td><td><a href="analyzer-diagnostics/kernel-nks0024">kernel-nks0024</a></td></tr><tr><td><code>NKS0025</code></td><td><a href="analyzer-diagnostics/kernel-nks0025">kernel-nks0025</a></td></tr><tr><td><code>NKS0026</code></td><td><a href="analyzer-diagnostics/kernel-nks0026">kernel-nks0026</a></td></tr><tr><td><code>NKS0027</code></td><td><a href="analyzer-diagnostics/kernel-nks0027">kernel-nks0027</a></td></tr><tr><td><code>NKS0031</code></td><td><a href="analyzer-diagnostics/kernel-nks0031">kernel-nks0031</a></td></tr><tr><td><code>NKS0032</code></td><td><a href="analyzer-diagnostics/kernel-nks0032">kernel-nks0032</a></td></tr><tr><td><code>NKS0033</code></td><td><a href="analyzer-diagnostics/kernel-nks0033">kernel-nks0033</a></td></tr><tr><td><code>NKS0037</code></td><td><a href="analyzer-diagnostics/kernel-nks0037">kernel-nks0037</a></td></tr><tr><td><code>NKS0038</code></td><td><a href="analyzer-diagnostics/kernel-nks0038">kernel-nks0038</a></td></tr><tr><td><code>NKS0039</code></td><td><a href="analyzer-diagnostics/kernel-nks0039">kernel-nks0039</a></td></tr><tr><td><code>NKS0040</code></td><td><a href="analyzer-diagnostics/kernel-nks0040">kernel-nks0040</a></td></tr><tr><td><code>NKS0041</code></td><td><a href="analyzer-diagnostics/kernel-nks0041">kernel-nks0041</a></td></tr><tr><td><code>NKS0042</code></td><td><a href="analyzer-diagnostics/kernel-nks0042">kernel-nks0042</a></td></tr><tr><td><code>NKS0043</code></td><td><a href="analyzer-diagnostics/kernel-nks0043">kernel-nks0043</a></td></tr><tr><td><code>NKS0052</code></td><td><a href="analyzer-diagnostics/kernel-nks0052">kernel-nks0052</a></td></tr><tr><td><code>NKS0053</code></td><td><a href="analyzer-diagnostics/kernel-nks0053">kernel-nks0053</a></td></tr><tr><td><code>NKS0044</code></td><td><a href="analyzer-diagnostics/languages-nks0044">languages-nks0044</a></td></tr><tr><td><code>NKS0045</code></td><td><a href="analyzer-diagnostics/languages-nks0045">languages-nks0045</a></td></tr><tr><td><code>NKS0046</code></td><td><a href="analyzer-diagnostics/languages-nks0046">languages-nks0046</a></td></tr><tr><td><code>NKS0051</code></td><td><a href="analyzer-diagnostics/network-nks0051">network-nks0051</a></td></tr><tr><td><code>NKS0047</code></td><td><a href="analyzer-diagnostics/text-nks0047">text-nks0047</a></td></tr><tr><td><code>NKS0048</code></td><td><a href="analyzer-diagnostics/text-nks0048">text-nks0048</a></td></tr><tr><td><code>NKS0049</code></td><td><a href="analyzer-diagnostics/text-nks0049">text-nks0049</a></td></tr><tr><td><code>NKS0050</code></td><td><a href="analyzer-diagnostics/text-nks0050">text-nks0050</a></td></tr><tr><td><code>NKS0054</code></td><td><a href="analyzer-diagnostics/text-nks0054">text-nks0054</a></td></tr><tr><td><code>NKS0055</code></td><td><a href="analyzer-diagnostics/text-nks0055">text-nks0055</a></td></tr></tbody></table>
{% endtab %}
{% endtabs %}

{% hint style="info" %}
It's vital to follow the analyzer recommendations to get the best mod code according to the standards.
{% endhint %}
