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

enhancement: CSharpier config filename and path override ability #3664

Merged

Conversation

TommyE123
Copy link
Contributor

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

  1. Fixed config path option command.
  2. Added default file name .csharpierrc.
  3. Updated schema to reflext the 2 new available options avaiable. (assumed this was required but please say if this isn't or I need to update anything else?)

Testing - Mixture of CI builds to demonstrate the fix

GITLAB - Both filename and location overridden:
image
image

GITLAB - .csharpierrc in default Linter rules location:
image

AZURE - Filename overridden .csharpierrc.yml in default Linter rules location:
image
image

GITHUB - Filename .csharpierrc.yml in root (no extra megalinter parameters set):
image

Copy link
Collaborator

@echoix echoix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again as always, you went above and beyond to prove the work and the justifications. (I don't even have access to a setup that has these three CI platforms). The actual contents of the PR look correct.

Rerunning the failed test for unrelated reasons, and setting up the automerge like the other PR.

@echoix echoix enabled auto-merge (squash) June 16, 2024 21:09
@echoix echoix merged commit 24227ec into oxsecurity:main Jun 16, 2024
12 checks passed
@TommyE123 TommyE123 deleted the csharpier_config_file_improvements branch June 20, 2024 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Specify Configuration File for CSharpier Linter
2 participants