NameCheck.CLI 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global NameCheck.CLI --version 1.0.0                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local NameCheck.CLI --version 1.0.0                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=NameCheck.CLI&version=1.0.0                
nuke :add-package NameCheck.CLI --version 1.0.0                

Naming Convention Checker

The Naming Convention Checker is a dotnet CLI tool designed to assist developers in enforcing consistent naming conventions in their C# projects. This tool scans C# files and identifies any violations against predefined naming conventions.

Usage

After installing the package, you can utilize the Naming Convention Checker in various scenarios:

  • Checking Naming Conventions in a Single File:

    namecheck --file path/to/file
    
  • Checking Naming Conventions in All Files within a Directory (Non-Recursively):

    namecheck --all /path/to/directory
    
  • Checking Naming Conventions in All Files within a Directory (Recursively):

    namecheck --recursive /path/to/directory
    

Configuration

The Naming Convention Checker allows for customization of naming conventions through a template file. You can provide a template file using the --template option. Below is an example template file:

**Command 😗*

namecheck --template /path/to/template/json/file

Template.json

{
  "RuleName": "Default",
  "NameSpaceRule": {
    "Convention": "PASCALCASE"
  },
  "ClassRule": {
    "PrivateConvention": "PASCALCASE",
    "PublicConvention": "CAMELCASE",
    "InternalConvention": "PASCALCASE   ",
    "ProtectedConvention": "PASCALCASE"
  },
  "InterfaceRule": {
    "PublicConvention": "PASCALCASE",
    "InternalConvention": "PASCALCASE"
  },
  "MethodRule": {
    "PublicConvention": "PASCALCASE",
    "PrivateConvention": "PASCALCASE",
    "InternalConvention": "PASCALCASE",
    "ProtectedConvention": "PASCALCASE"
  },
  "PropertyRule": {
    "PublicConvention": "PASCALCASE",
    "PrivateConvention": "PASCALCASE",
    "InternalConvention": "PASCALCASE",
    "ProtectedConvention": "PASCALCASE"
  },
  "FieldRule": {
    "PublicConvention": "PASCALCASE",
    "PrivateConvention": "PASCALCASE",
    "InternalConvention": "PASCALCASE",
    "ProtectedConvention": "PASCALCASE"
  },
  "StructRule": {
    "PublicConvention": "PASCALCASE",
    "InternalConvention": "PASCALCASE"
  },
  "EnumRule": {
    "Convention": "PASCALCASE"
  },
  "ConstantRule": {
    "Convention": "UPPERCASE"
  },
  "RecordRule": {
    "PublicConvention": "PASCALCASE",
    "InternalConvention": "PASCALCASE"
  },
  "DelegateRule": {
    "PublicConvention": "PASCALCASE",
    "InternalConvention": "PASCALCASE"
  },
  "VariableRule": {
    "Convention": "PASCALCASE"
  }
}

Note : If template is not given in the command. it will take Pascal case for all value as default (convention in the above json).

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.0.1 154 4/3/2024
1.0.0 133 4/3/2024