Sonar analyzers have the ability to deprecated rule keys i.e. change the key for a rule, and list the old key as "deprecated". The SonarLint daemon has been updated to handle deprecated rule keys.
However, there could be problems if rule keys are stored locally on the developer machine. This could happen the following areas:
rule configuration (standalone and connected mode)
The set of rules being executed could be incorrect; the wrong rules parameters could be used; the wrong severity could be reported.
Issues that have been suppressed on the server are not suppressed in the UI.
Options:
warn the user
automatically fix up any locally stored settings <- could impact files under source control
automatically fix up the configuration in memory i.e. silently translate.
Breakdown by language
C# and VB.NET
Rule configuration
Rule configuration is stored in ruleset files. To date, C#/VB have never changed the ID of a rule/diagnostic. The likelihood of this ever happening is considered low.
In connected mode, updating the binding will regenerate the ruleset, presumably using the new rule id. Deprecating a rule key can only be done when releasing a new version of the plugin. If this updates the Quality Profile then the user will be prompted to refresh their configuration.
Questions:
(1) does updating the plugin update the timestamp on the QP?
(2) is this still the case if the user has a custom QP?
Issue suppression
Currently the list of suppressions is fetched from the server - nothing is stored locally.
Note that this might change in the future to improve performance (and prevent a gold bar from being displayed) - see #1005)
JavaScript
Currently configuration of JS rules/issue suppression is not supported in standalone or connected mode, so rule keys are not stored locally -> no impact.
C/C++
Rule configuration
C/C++ supports rule configuration in both standalone and connected mode.
Connected mode: same situation as C#/VB.NET above.
Standalone mode: if a rule key is deprecated then the local configuration will not have the expected effect.
Question: have C/C++ rule keys have every been deprecated?
Answer:no, no rule keys have been deprecated to date. Yes, rule keys changed in v6.32
However, some rules are marked as deprecated, which is a separate thing (status=DEPRECATED)
Issue suppression
Issues suppression is not currently supported. See #1107. Done.
Description
Sonar analyzers have the ability to deprecated rule keys i.e. change the key for a rule, and list the old key as "deprecated". The SonarLint daemon has been updated to handle deprecated rule keys.
However, there could be problems if rule keys are stored locally on the developer machine. This could happen the following areas:
Related: SLVSCODE-111
Impact:
The set of rules being executed could be incorrect; the wrong rules parameters could be used; the wrong severity could be reported.
Issues that have been suppressed on the server are not suppressed in the UI.
Options:
Breakdown by language
C# and VB.NET
Rule configuration
Rule configuration is stored in ruleset files. To date, C#/VB have never changed the ID of a rule/diagnostic. The likelihood of this ever happening is considered low.
Issue suppression
Currently the list of suppressions is fetched from the server - nothing is stored locally. Note that this might change in the future to improve performance (and prevent a gold bar from being displayed) - see #1005)
JavaScript
Currently configuration of JS rules/issue suppression is not supported in standalone or connected mode, so rule keys are not stored locally -> no impact.
C/C++
Rule configuration
C/C++ supports rule configuration in both standalone and connected mode.
Question: have C/C++ rule keys have every been deprecated? Answer:
no, no rule keys have been deprecated to date.Yes, rule keys changed in v6.32 However, some rules are marked asdeprecated
, which is a separate thing (status=DEPRECATED
)Issue suppression
Issues suppression is not currently supported. See #1107.Done.