AiCodeReview.Analyzer
1.0.0
See the version list below for details.
dotnet add package AiCodeReview.Analyzer --version 1.0.0
NuGet\Install-Package AiCodeReview.Analyzer -Version 1.0.0
<PackageReference Include="AiCodeReview.Analyzer" Version="1.0.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="AiCodeReview.Analyzer" Version="1.0.0" />
<PackageReference Include="AiCodeReview.Analyzer"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add AiCodeReview.Analyzer --version 1.0.0
#r "nuget: AiCodeReview.Analyzer, 1.0.0"
#:package AiCodeReview.Analyzer@1.0.0
#addin nuget:?package=AiCodeReview.Analyzer&version=1.0.0
#tool nuget:?package=AiCodeReview.Analyzer&version=1.0.0
AiCodeReview.Analyzer
🤖 Automatic AI-powered code review on every build — powered by Mistral 7B via the Siemens LLM API.
What is it?
AiCodeReview.Analyzer is a Roslyn diagnostic analyzer that hooks into the C# compiler pipeline.
Every time you build, it silently sends your methods to an LLM and surfaces actionable feedback directly as compiler warnings (AICR001) — inline in the editor, Error List, and CI logs.
No extra tooling. No browser. No copy-paste. Just build.
Installation
Via NuGet Package Manager (Visual Studio)
Search for AiCodeReview.Analyzer and click Install.
Via CLI
dotnet add package AiCodeReview.Analyzer
Via .csproj
<PackageReference Include="AiCodeReview.Analyzer" Version="1.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
How it works
You build your project
│
▼
Roslyn runs the analyzer on every method / constructor / property
│
▼
Analyzer sends the code to Mistral-7B-Instruct (Siemens LLM API)
│
▼
AI feedback appears as ⚠ AICR001 warnings inline in Visual Studio
Example output
Class1.cs(6): warning AICR001: Inefficiency — outer loop runs unnecessary
passes after last swap. Add an early-exit flag.
Class1.cs(19): warning AICR001: Naming — rename FindUser to FindUserByName;
current name is ambiguous about return type intent.
Configuration
The package works out of the box with no setup required.
Optionally override the endpoint or key via environment variables:
Setting env vars (PowerShell)
$env:AI_CODE_REVIEW_URL = "https://your-custom-endpoint/v1/chat/completions"
$env:AI_CODE_REVIEW_KEY = "your-api-key"
Setting env vars (CI — GitHub Actions)
env:
AI_CODE_REVIEW_URL: ${{ secrets.AI_CODE_REVIEW_URL }}
AI_CODE_REVIEW_KEY: ${{ secrets.AI_CODE_REVIEW_KEY }}
Controlling severity
Adjust or silence the diagnostic per project via .editorconfig:
[*.cs]
# Options: error | warning | suggestion | silent | none
dotnet_diagnostic.AICR001.severity = warning
Suppress for a specific method:
#pragma warning disable AICR001
public void MyMethod() { ... }
#pragma warning restore AICR001
Supported node types
The analyzer reviews the following C# constructs:
- ✅ Methods (
MethodDeclaration) - ✅ Constructors (
ConstructorDeclaration) - ✅ Properties (
PropertyDeclaration) - ✅ Local functions (
LocalFunctionStatement)
Requirements
| Requirement | Value |
|---|---|
| .NET | Any (.NET Standard 2.0 compatible) |
| Visual Studio | 2019 or later |
| Roslyn | 4.3+ |
| Internet access | Required (calls LLM API at build time) |
License
MIT © ravikalluri
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.