From 24227ec3ac806211b747cfefdaffda93345346c7 Mon Sep 17 00:00:00 2001 From: Tom Date: Sun, 16 Jun 2024 22:46:46 +0100 Subject: [PATCH] CSharpier config filename and path override ability (#3664) --- CHANGELOG.md | 1 + .../descriptors/csharp.megalinter-descriptor.yml | 2 ++ .../megalinter-configuration.jsonschema.json | 13 +++++++++++++ 3 files changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3c78bb00bc..e557a7a01bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l - Linters - Add python package Pygments to rst-lint venv + - [CSharpier](https://csharpier.com) added ability to override config filename and path - Reporters diff --git a/megalinter/descriptors/csharp.megalinter-descriptor.yml b/megalinter/descriptors/csharp.megalinter-descriptor.yml index 08cf0b174dd..0888cc178c4 100644 --- a/megalinter/descriptors/csharp.megalinter-descriptor.yml +++ b/megalinter/descriptors/csharp.megalinter-descriptor.yml @@ -45,6 +45,8 @@ linters: linter_rules_configuration_url: https://csharpier.com/docs/Configuration linter_rules_ignore_config_url: https://csharpier.com/docs/Ignore ignore_file_name: .csharpierignore + config_file_name: .csharpierrc + cli_config_arg_name: "--config-path" cli_executable: dotnet-csharpier cli_lint_mode: list_of_files cli_lint_extra_args: diff --git a/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json b/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json index 2aa21709762..37029750a87 100644 --- a/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json +++ b/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json @@ -3297,6 +3297,13 @@ "title": "CSHARP_CSHARPIER: Override default cli lint mode", "type": "string" }, + "CSHARP_CSHARPIER_CONFIG_FILE": { + "$id": "#/properties/CSHARP_CSHARPIER_CONFIG_FILE", + "default": ".csharpierrc", + "description": "CSHARP_CSHARPIER: User custom config file name if different from default", + "title": "CSHARP_CSHARPIER: Custom config file name", + "type": "string" + }, "CSHARP_CSHARPIER_COMMAND_REMOVE_ARGUMENTS": { "$id": "#/properties/CSHARP_CSHARPIER_COMMAND_REMOVE_ARGUMENTS", "description": "CSHARP_CSHARPIER: User custom arguments to remove before calling linter", @@ -3393,6 +3400,12 @@ "title": "CSHARP_CSHARPIER: Define or override a list of bash commands to run before the linter", "type": "array" }, + "CSHARP_CSHARPIER_RULES_PATH": { + "$id": "#/properties/CSHARP_CSHARPIER_RULES_PATH", + "description": "CSHARP_CSHARPIER: Path where to find linter configuration file", + "title": "CSHARP_CSHARPIER: Custom config file path", + "type": "string" + }, "CSHARP_CSHARPIER_UNSECURED_ENV_VARIABLES": { "$id": "#/properties/CSHARP_CSHARPIER_UNSECURED_ENV_VARIABLES", "default": [],