mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed following code smells reported by SonarQube:
1) Immediately return this expression instead of assigning it to the temporary variable. 2) Extract this nested ternary operation into an independent statement. 3) Expected a `for-of` loop instead of a `for` loop with this simple iteration.
This commit is contained in:
@@ -123,12 +123,11 @@
|
||||
}
|
||||
|
||||
CodeMirror.registerHelper('fold', 'sql', function(cm, start) {
|
||||
var fromToPos = pgadminKeywordRangeFinder(cm, start, [
|
||||
return pgadminKeywordRangeFinder(cm, start, [
|
||||
{start: 'BEGIN', end:'END;'},
|
||||
{start: 'IF', end:'END IF'},
|
||||
{start: 'LOOP', end:'END LOOP'},
|
||||
{start: 'CASE', end:'END CASE'},
|
||||
]);
|
||||
return fromToPos;
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user