Start from the default ruleset when configuring custom rules - #119
Open
Bazooper-blip wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Addresses the core request in #80: switching to "Use a custom ruleset" in the Standalone Mode settings now starts from SonarDelphi's default ruleset instead of selecting every rule, so the default set can be fine-tuned by adding/removing rules.
Changes:
RemoteRuleand the rule-retrieval response (RuleData) carry adefaultEnabledflag. Standalone hosts populate it fromSonarLintRuleDefinition.isActiveByDefault()— the same source already used to decide the default-ruleset analysis behaviour. Rules from a SonarQube server reporttrue, since everything retrieved there belongs to the active quality profile (the flag is only consumed by the standalone settings UI).TRuleparses the new optionaldefaultEnabledfield (defaulting tofalsefor older servers).The follow-up suggestions in the issue's comments (a search bar and friendlier list ordering) are not included — they're UI work that seems better as a separate change.
Testing: server Maven suite passes; client suite passes with a new
TRule.CreateFromJsontest fordefaultEnabled(present and absent). The settings-frame behaviour compiles and follows the existing populate/save flow, but I could not exercise the dialog in a live IDE — a manual check of switching between default/custom rulesets before merge would be appreciated.