-
Couldn't load subscription status.
- Fork 75
Draft: Implement proper rule overriding to address issue #488 #711
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
base: master
Are you sure you want to change the base?
Conversation
|
For the JSON config, if there are both deprecated configs and non-deprectated configs that do the same thing, which one take priority? Or, should this be the time to remove the deprectated settings? |
|
Thinking about it, if the config is in F#, a new command line argument can be added that JSON serializes the type to the screen or a file for someone to start with. |
|
While comparing the Missing on the
Missing in the JSON file
|
|
FSharpLint/src/FSharpLint.Core/Application/Configuration.fs Lines 711 to 712 in 873d145
I noticed after the fact that this has been deprecated. |
|
The following rules are NOT part of the
|
|
Hi Bennie, thanks for your work so far! Sorry for the delay replying, life is kind of hectic nowadays for me.
Do you mind opening a separate PR to fix this please? |
|
Sure, new PR for that change here: #713. |
|
@BennieCopeland sorry for the huge delay Bennie and thanks for your work, do you mind rebasing? Looks like CI would be fixed just by doing that. |
|
@BennieCopeland thanks for taking a look at this again! But I think you forgot to push a commit in your latest rebase? |
|
@knocte Yes, I had some more unfinished work stashed, but it's been so long since I've looked at this that I'm having to reconstruct what exactly I what I was trying to do. I'll start looking at this again and see what I need to do to finish it up. |
I'm looking to add proper overriding back in. I expect that this will be a breaking change as the current functionality appears to allow running no rules by providing an empty JSON object. The new functionality will run all default enabled rules unless explicitly disabled in a custom config.
For the implementation, there are a few different ways I've considered that require discussion.
Keep the default rules in a JSON file, or rewrite them as F# code?
JSON File Pros
JSON File Cons
F# Code Pros
F# Code Cons
Whether the rules are kept in JSON or F#, adding/removing rules or changing defaults results in a new build and version bump.
Continue to use the same
Configurationtype, or renameConfigurationtoOverridesand create a newConfigurationtype withoutoptionalto reflect the default config.