SonarLint for VS Code not scanning COBOL programs after 4.7 update

Please provide

  • Window 10
  • SonarLint plugin version: 4.7
  • Programming language you’re coding in: COBOL
  • Is connected mode used: Yes, SonarQube

Since the 4.7 update, SonarLint reports that all the COBOL rules are unavailable in sonarlint, even thought the scanner has been downloaded from the server. Thie COBOL scan worked in 4.6

[Debug - 14:12:01.774] [SYNC] Code analyzer 'cobol' is up-to-date. Skip downloading it.
...
[Debug - 14:12:43.095] * cobol: 74 active rules
[Debug - 14:12:43.095] Rule cobol:SQL.CursorOpenedInsideLoopCheck is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.095] Rule cobol:SQL.SelectWithNoWhereClauseCheck is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.095] Rule cobol:S3671 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.095] Rule cobol:S4882 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.095] Rule cobol:COBOL.MergeStatementUsageCheck is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.095] Rule cobol:S2583 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.096] Rule cobol:S3595 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.096] Rule cobol:S1134 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.096] Rule cobol:S1135 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.096] Rule cobol:S3633 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.096] Rule cobol:S3632 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.096] Rule cobol:S1138 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.097] Rule cobol:S2589 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.097] Rule cobol:S1656 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.097] Rule cobol:SQL.SelectStatementsNestedCheck is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.097] Rule cobol:S1735 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.098] Rule cobol:S4727 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.098] Rule cobol:S1739 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.098] Rule cobol:SQL.CursorDeclaredInsideLoopCheck is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.098] Rule cobol:COBOL.DataItemInitialValueCheck is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.098] Rule cobol:S3581 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.098] Rule cobol:COBOL.ParagraphComplexityCheck is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.098] Rule cobol:COBOL.ConditionComplexityCheck is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.098] Rule cobol:S3582 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.098] Rule cobol:COBOL.StopRunUsageCheck is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.098] Rule cobol:COBOL.RecursivePerformCheck is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.098] Rule cobol:S1682 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.098] Rule cobol:S1683 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.098] Rule cobol:COBOL.PerformThruParagraphOrderCheck is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.098] Rule cobol:S1686 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.098] Rule cobol:S3621 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.098] Rule cobol:S1764 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.098] Rule cobol:COBOL.EvaluateStatementUsageCheck is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.099] Rule cobol:COBOL.UnusedDataItem is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.099] Rule cobol:S1723 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.099] Rule cobol:S3625 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.099] Rule cobol:S1966 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.099] Rule cobol:S1725 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.099] Rule cobol:S1967 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.099] Rule cobol:S1969 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.099] Rule cobol:SQL.DynamicSqlCheck is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.099] Rule cobol:COBOL.SortStatementUsageCheck is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.099] Rule cobol:S1590 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.099] Rule cobol:SQL.CursorClosedInsideLoopCheck is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.099] Rule cobol:S1110 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.099] Rule cobol:S3892 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.099] Rule cobol:S1871 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.100] Rule cobol:S1631 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.100] Rule cobol:COBOL.CommentedOutCodeCheck is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.100] Rule cobol:S3614 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.100] Rule cobol:COBOL.FileUnusedCheck is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.101] Rule cobol:S2527 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.101] Rule cobol:S4507 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.101] Rule cobol:S3618 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.102] Rule cobol:COBOL.IfStatementFormattingCheck is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.103] Rule cobol:S4054 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.103] Rule cobol:COBOL.ProgramNameCheck is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.103] Rule cobol:S3482 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.103] Rule cobol:S1066 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.103] Rule cobol:S3004 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.104] Rule cobol:S1069 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.104] Rule cobol:S1740 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.104] Rule cobol:S1862 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.105] Rule cobol:S3643 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.105] Rule cobol:S1302 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.105] Rule cobol:S3921 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.105] Rule cobol:S1303 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.105] Rule cobol:S3923 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.105] Rule cobol:S1305 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.105] Rule cobol:S1306 is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.105] Rule cobol:COBOL.LinkageSectionUsageCheck is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.105] Rule cobol:SQL.SelectStarUsageCheck is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.105] Rule cobol:COBOL.ExitProgramUsageCheck is enabled on the server, but not available in SonarLint
[Debug - 14:12:43.105] Rule cobol:COBOL.CopyInsideProcedureDivisionCheck is enabled on the server, but not available in SonarLint

These messages don’t appear when using 4.6

Hello, welcome to the community! And thanks for reporting this.

I could not reproduce this behavior. All of the rules mentioned should be available in SonarLint. Most probably, something in your environment prevents the COBOL analyzer from being loaded.

Could you please share the full SonarLint Output?

If it is too large and/or contains private information that you would prefer not to share, we can switch to a private discussion on this forum.

Also, which version/edition of SonarQube are you connecting to?

Thanks!

Hi!

I’ve updated to 4.8 version of the plugin, and the issue persists.

SonarQube is Enterprise Edition Version 9.9.1 (build 69595)

The full log is attached
sonarlintlog.txt (129.9 KB)

Hello @simon.longpre, It took us some time to understand the issue, but thanks to your report, we uncovered a bug!

In v4.7 of the plugin, we dropped support for Connected Mode with SonarQube versions older than 9.9. And, mistakenly we were expecting all SonarQube connections to be higher than 9.9.6, missing other cases like yours (9.9.1) :see_no_evil:

We have fixed this behavior, and if you install v4.9.1 of the plugin, you should be back with fully functioning SonarLint in Connected Mode. To be on the safe side, I recommend cleaning up all the current connections and bindings and creating a new one.

Thank you very much for your proactivity in reporting the problem, and of course for your patience :slight_smile:

Hope that helps,
Sophio

1 Like

Just tested, problem fixed! Thank you so much!

2 Likes