Skip to content

Latest commit

History

History
42 lines (31 loc) 路 2.63 KB

csharp.md

File metadata and controls

42 lines (31 loc) 路 2.63 KB
title description
CSHARP linters in MegaLinter
dotnet-format, csharpier, roslynator are available to analyze CSHARP files in MegaLinter

C#

Linters

Linter Additional
dotnet-format
CSHARP_DOTNET_FORMAT
GitHub stars formatter
csharpier
CSHARP_CSHARPIER
GitHub stars formatter
roslynator
CSHARP_ROSLYNATOR
GitHub stars formatter

Linted files

  • File extensions:
    • .cs

Configuration in MegaLinter

Variable Description Default value
CSHARP_PRE_COMMANDS List of bash commands to run before the linters None
CSHARP_POST_COMMANDS List of bash commands to run after the linters None
CSHARP_FILTER_REGEX_INCLUDE Custom regex including filter
CSHARP_FILTER_REGEX_EXCLUDE Custom regex excluding filter

Behind the scenes

Installation

  • Dockerfile commands :
RUN apk add --no-cache dotnet8-sdk
ENV PATH="${PATH}:/root/.dotnet/tools"