sonar-delphi icon indicating copy to clipboard operation
sonar-delphi copied to clipboard

Add check for array iterations where the high bound is out of range

Open fourls opened this issue 9 months ago • 2 comments

Fixes #95. I haven't added this to the Sonar way quality profile, but it probably could be added depending on how noisy it is. I'll run some tests and see.

fourls avatar Apr 23 '25 05:04 fourls

I'd definitely lean towards the default quality profile since this is a common bug pattern.

cirras avatar Apr 23 '25 05:04 cirras

  • Added to the default quality profile, and
  • Added a test that Pred(X.Count) does not add an issue

fourls avatar Apr 24 '25 03:04 fourls

Updated to only flag cases where low = 0.

fourls avatar May 06 '25 03:05 fourls