SonarCloud displays false errors due to it does not check a rule according to the custom parameters we set. Whatever the default value is, it checks accordingly and shows an error. For example, we enabled maximum line length rule. Its default value is 120 but set it to 160. Even though we delete and rescan many times it checks the code with default values and shows errors.
Does this behavior apply to the new lines that were not previously analyzed? Or you see the issue only on the lines that were previously marked as too long with the 120 value?
Thanks for your answer.
It is happening for new lines. I assumed that previously analyzed lines not updated each rule change, so I deleted all the branches and do the analyzes again, but same thing happened. Moreover, we also get this error on new PR/Branch analyzes too.
I managed to reproduce the issue and indeed looks like a bug on our side. The ticket was created, you can track the progress here: https://jira.sonarsource.com/browse/SONARSWIFT-485 Please keep in mind that it may take some time to tackle this issue.
Hi @Marcin_Majewski ,
Thanks for your interest.
I just wanna do an addition, this issue is not specific to this rule, other rules also behave like this, ignores custom parameters.
Hi @Marcin_Majewski
For example ‘Function names should comply with a naming convention’ rule too.
We updated its custom parameter format as ^[a-z][a-zA-Z0-9_]*$ but sonar cloud shows an error for migrateSchemaVersion_14_to_15 named function even-though it conforms the regex condition.