enhancement: CSharpier config filename and path override ability #3664
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #3553
CSharpier - Filename and path override improvements
This change adds the ability to override the location of the
.csharpierrc
filename and path. Currently its using the default option for the command-c
which is incorrect and requires--config-path
csharpier documentation.This also now allows the
.csharpierrc
file to be placed in the default linter path which currently doesn't work due to the wrong command parameter.Please note this doesn't allow an
.editorconfig
to work in another location as this isnt currently supported by csharpier. (see issue 3553 for more info) However if this changes then the fix should also work nicely with this approach as well.Proposed Changes
Testing - Mixture of CI builds to demonstrate the fix
GITLAB - Both filename and location overridden:
GITLAB - .csharpierrc in default Linter rules location:
AZURE - Filename overridden .csharpierrc.yml in default Linter rules location:
GITHUB - Filename .csharpierrc.yml in root (no extra megalinter parameters set):