AI CodeFix for C/C++

Hi,

Me and our company is intrested in AI solution from Sonar,

currently we are using SonarQube Cloud and we allowed for AI Code Fix in some project - just for test,

but there is a problem, Sonar does not offer fixes and on your page Fixing issues | SonarQube Cloud Documentation i found this statment

image

So our question is : What issues (rules ?) are supported ? We are following C and C++ MISRA, CERT.

Hey there.

Currently, our AI-generated fix suggestions are available for a carefully selected subset of C++ rules—49 in total. These have been selected by prioritizing rules that most often raise issues SonarQube issues, alongside how likely it is that the fix will be appropriate. We’ll continue to expand the ruleset in the coming months.

1 Like

Just made sure it was okay to share the list of rules, as of today. :slight_smile:

cpp:S872
cpp:S878
cpp:S905
cpp:S959
cpp:S995
cpp:S1048
cpp:S1066
cpp:S1117
cpp:S1121
cpp:S1155
cpp:S1188
cpp:S1199
cpp:S1235
cpp:S1238
cpp:S125
cpp:S1301
cpp:S134
cpp:S1751
cpp:S1768
cpp:S1854
cpp:S1905
cpp:S1912
cpp:S2259
cpp:S2681
cpp:S2807
cpp:S3229
cpp:S3358
cpp:S3458
cpp:S3490
cpp:S3574
cpp:S3659
cpp:S3806
cpp:S3923
cpp:S3972
cpp:S5028
cpp:S5271
cpp:S5350
cpp:S5416
cpp:S5566
cpp:S5825
cpp:S5997
cpp:S6005
cpp:S6045
cpp:S6180
cpp:S6185
cpp:S6195
cpp:S6197
cpp:S6229
cpp:S6391

For some reason, this isn’t in the docs. I’m following up on that.

1 Like

Hi,

thank you very much !

and what about C# ? can you list rules which are covered by AI-generated fix suggestiones ?

thanks !

Here are the 86 C# rules currently available for AI CodeFix:

csharpsquid:S101  
csharpsquid:S1066  
csharpsquid:S107  
csharpsquid:S1110  
csharpsquid:S1116  
csharpsquid:S1117  
csharpsquid:S1118  
csharpsquid:S112  
csharpsquid:S1121  
csharpsquid:S1125  
csharpsquid:S1135  
csharpsquid:S1144  
csharpsquid:S1155  
csharpsquid:S1168  
csharpsquid:S1186  
csharpsquid:S1199  
csharpsquid:S1244  
csharpsquid:S125  
csharpsquid:S1264  
csharpsquid:S1450  
csharpsquid:S1481  
csharpsquid:S1643  
csharpsquid:S1656  
csharpsquid:S1764  
csharpsquid:S1848  
csharpsquid:S1871  
csharpsquid:S1905  
csharpsquid:S1939  
csharpsquid:S1940  
csharpsquid:S2178  
csharpsquid:S2219  
csharpsquid:S2223  
csharpsquid:S2259  
csharpsquid:S2292  
csharpsquid:S2325  
csharpsquid:S2342  
csharpsquid:S2344  
csharpsquid:S2368  
csharpsquid:S2372  
csharpsquid:S2376  
csharpsquid:S2445  
csharpsquid:S2479  
csharpsquid:S2629  
csharpsquid:S2681  
csharpsquid:S2701  
csharpsquid:S2933  
csharpsquid:S2971  
csharpsquid:S3010  
csharpsquid:S3217  
csharpsquid:S3220  
csharpsquid:S3241  
csharpsquid:S3247  
csharpsquid:S3260  
csharpsquid:S3267  
csharpsquid:S3358  
csharpsquid:S3415  
csharpsquid:S3442  
csharpsquid:S3445  
csharpsquid:S3456  
csharpsquid:S3457  
csharpsquid:S3604  
csharpsquid:S3626  
csharpsquid:S3655  
csharpsquid:S3878  
csharpsquid:S3881  
csharpsquid:S3897  
csharpsquid:S3903  
csharpsquid:S3928  
csharpsquid:S3949  
csharpsquid:S3973  
csharpsquid:S4035  
csharpsquid:S4050  
csharpsquid:S4275  
csharpsquid:S4487  
csharpsquid:S4581  
csharpsquid:S4663  
csharpsquid:S6602  
csharpsquid:S6603  
csharpsquid:S6605  
csharpsquid:S6608  
csharpsquid:S6667  
csharpsquid:S6668  
csharpsquid:S6672  
csharpsquid:S6678  
csharpsquid:S6966  
csharpsquid:S927