mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed following SonarQube issues:
1. Boolean checks should not be inverted. 2. The comma operator should not be used. 3. Arguments to built-in functions should match documented types. 4. Redundant pairs of parentheses should be removed. 5. A conditionally executed single line should be denoted by indentation, 6. A while loop should be used instead of a 'for' loop.
This commit is contained in:
committed by
Akshay Joshi
parent
6a63279396
commit
707ff450b5
@@ -26,7 +26,7 @@
|
||||
let tokenSetNo = 0;
|
||||
let startTkn = tokenSet[tokenSetNo].start,
|
||||
endTkn = tokenSet[tokenSetNo].end;
|
||||
for (; at > 0;) {
|
||||
while (at > 0) {
|
||||
var found = lineText.lastIndexOf(startTkn, at);
|
||||
var startToken = startTkn;
|
||||
var endToken = endTkn;
|
||||
@@ -57,7 +57,8 @@
|
||||
outer: for (var i = line + 1; i < lastLine; ++i) {
|
||||
var text = cm.getLine(i),
|
||||
pos = 0;
|
||||
for (;;) {
|
||||
var whileloopvar = 0;
|
||||
while (whileloopvar < 1) {
|
||||
var nextOpen = text.indexOf(startToken, pos),
|
||||
nextClose = text.indexOf(endToken, pos);
|
||||
if (nextOpen < 0) nextOpen = text.length;
|
||||
|
||||
Reference in New Issue
Block a user