Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify Configuration File for CSharpier Linter #3553

Open
NadaMusthafa opened this issue May 11, 2024 · 2 comments
Open

Specify Configuration File for CSharpier Linter #3553

NadaMusthafa opened this issue May 11, 2024 · 2 comments
Labels
question Further information is requested

Comments

@NadaMusthafa
Copy link

Currently, there are no environment variables available for CSharpier linter to point to a configuration file, making it challenging to specify rules from a specific configuration file. This limitation inhibits users from customizing linting rules efficiently.Hence, with current implementation, how can we set CSharpier linter to point to a custom configuration file?

@NadaMusthafa NadaMusthafa added the question Further information is requested label May 11, 2024
@nvuillam
Copy link
Member

@NadaMusthafa please could you share an example of call to CSharpier with config file, so we can add its management in MegaLinter ?

@creativehub2000
Copy link

We used the following Settings:

Docker Image (latest): oxsecurity/megalinter-only-csharp_csharpier:beta_20240508-1708

Environment variables:

For MegaLinter:
MEGALINTER_FILES_TO_LINT : <list_of_comma_seperated_C#_files>
ENABLE_LINTERS : CSHARP_CSHARPIER
AZURE_COMMENT_REPORTER : false

For CSharpier:
CSHARP_CSHARPIER_CONFIG_FILE : '/config/.editorconfig'
CSHARP_CSHARPIER_CLI_LINT_MODE : list_of_files

With this basic setting, CSharpier throws an exception as shown.

megalinter_issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants