Commit 927f16f
Vibe Bot
Fix SonarQube issues in S2310 implementation
Reduce cognitive complexity (S3776) and nesting depth (S134) in the
checkCounter function by extracting the skip-ahead detection logic into
a standalone isIntentionalSkipAhead helper function. This moves the
UpdateExpression and compound assignment checks out of deeply nested
control flow, lowering checkCounter's cognitive complexity from 17 to ~8
(allowed: 15) and eliminating nesting beyond 3 levels. No behavioral
changes; all existing tests pass.1 parent e41c349 commit 927f16f
2 files changed
+44
-12
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 54 | + | |
| 55 | + | |
65 | 56 | | |
66 | 57 | | |
67 | 58 | | |
| |||
108 | 99 | | |
109 | 100 | | |
110 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
111 | 121 | | |
112 | 122 | | |
113 | 123 | | |
| |||
0 commit comments