MonAnalyseur 1.0.0

dotnet add package MonAnalyseur --version 1.0.0
NuGet\Install-Package MonAnalyseur -Version 1.0.0
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="MonAnalyseur" Version="1.0.0">
  <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 MonAnalyseur --version 1.0.0
#r "nuget: MonAnalyseur, 1.0.0"
#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 MonAnalyseur as a Cake Addin
#addin nuget:?package=MonAnalyseur&version=1.0.0

// Install MonAnalyseur as a Cake Tool
#tool nuget:?package=MonAnalyseur&version=1.0.0

Project Name - Code Analyzers Documentation

Introduction

This documentation provides an overview of the custom code analyzers developed for the project. These analyzers help maintain code quality and enforce specific coding standards within the project.

Table of Contents

  1. Analyzer List
  2. Rules
  3. Sample Violations and Corrections
  4. Usage
  5. Code Fixes
  6. Installation
  7. Contributing
  8. License

Analyzer List

This project includes the following custom analyzers:

  1. AppSettings File Verification Analyzer

    • Description: Ensures the presence of required appsettings files.
    • Rule ID: AppSettingsFilePresence
  2. Swagger Page Access URL Analyzer

    • Description: Ensures the correct Swagger page access URL.
    • Rule ID: CorrectSwaggerPageURL
  3. Avoid SQLite Analyzer

    • Description: Detects the use of SQLite and recommends alternatives.
    • Rule ID: AvoidSQLite
  4. Use UUID and Not ID Analyzer

    • Description: Promotes the use of UUID instead of ID where applicable.
    • Rule ID: UseUUIDNotID
  5. Correct API Route Analyzer

    • Description: Verifies that API routes start with 'api/v' followed by a version number.
    • Rule ID: CorrectSwaggerApiRoute
  6. .NET Version Checker

    • Description: Checks if the .NET version used in the project is greater than or equal to a specified version.
    • Rule ID: DotNetVersionChecker
  7. Log Checker

    • Description: Verifies that sensitive data is not logged.
    • Rule ID: LogChecker

Rules

Detailed explanations of each rule:

AppSettings File Verification Rule

  • Rule ID: AppSettingsFilePresence
  • Description: Ensures the presence of required appsettings files (e.g., appsettings.json, appsettings.Development.json).
  • Usage Scenario: Verifies that appsettings files exist in the project.

Swagger Page Access URL Rule

  • Rule ID: CorrectSwaggerPageURL
  • Description: Ensures the correct Swagger page access URL.
  • Usage Scenario: Validates that the RoutePrefix is set to "swagger" in Swagger setup.

Avoid SQLite Rule

  • Rule ID: AvoidSQLite
  • Description: Detects the use of SQLite and recommends using alternative databases like SQL Server, PostgreSQL, or MongoDB.
  • Usage Scenario: Checks for the presence of SQLite-specific code.

Use UUID and Not ID Rule

  • Rule ID: UseUUIDNotID
  • Description: Promotes the use of UUID for unique identifiers instead of ID.
  • Usage Scenario: Detects the use of ID as an identifier in the code.

Correct API Route Rule

  • Rule ID: CorrectSwaggerApiRoute
  • Description: Verifies that API routes start with 'api/v' followed by a version number.
  • Usage Scenario: Checks if API routes are correctly formatted.

.NET Version Rule

  • Rule ID: DotNetVersionChecker
  • Description: Checks if the .NET version used in the project is greater than or equal to a specified version, >= 6.0.
  • Usage Scenario: Ensures that the project uses a minimum .NET version required for compatibility.

Log Rule

  • Rule ID: LogChecker
  • Description: Verifies that sensitive data is not logged.
  • Usage Scenario: Checks if sensitive data is logged, ensuring data privacy and security.

Sample Violations and Corrections

You can find examples of code violations and their corresponding corrections for each rule in the Sample Violations and Corrections document.

Usage

Provide instructions on how to use these analyzers in your project.

Code Fixes

Explain how code fixes work and how users can apply them to their code.

Installation

Describe the installation process for adding these analyzers to your development environment.

Contributing

Provide information on how others can contribute to the development and improvement of these analyzers.

License

This project is licensed under the License Name - see the LICENSE file for details.

There are no supported framework assets in this package.

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.

Version Downloads Last updated
1.0.0 206 9/5/2023

Summary of changes made in this release of the package.