uccser/cs-field-guide

View on GitHub
csfieldguide/static/js/codemirror-mode-regex.js

Summary

Maintainability
B
5 hrs
Test Coverage

Function tokenBase has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var tokenBase = function(stream) {
      var ch = stream.next();

      if (ch == "\\" && stream.match(/./, false)) {
        if (stream.match(/u\w{4}/)) return "a";
Severity: Minor
Found in csfieldguide/static/js/codemirror-mode-regex.js - About 1 hr to fix

Avoid too many return statements within this function.
Open

        return "b";
Severity: Major
Found in csfieldguide/static/js/codemirror-mode-regex.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        if(g-1 < 0) return "err";
Severity: Major
Found in csfieldguide/static/js/codemirror-mode-regex.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return "a";
Severity: Major
Found in csfieldguide/static/js/codemirror-mode-regex.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        if (stream.match(/./)) return "a";
Severity: Major
Found in csfieldguide/static/js/codemirror-mode-regex.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return "g" + (g-- % 5);
Severity: Major
Found in csfieldguide/static/js/codemirror-mode-regex.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return "a";
Severity: Major
Found in csfieldguide/static/js/codemirror-mode-regex.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        if (stream.match(/(\d|\d,\d?)\}/))  return "a";
Severity: Major
Found in csfieldguide/static/js/codemirror-mode-regex.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return "g" + g;
Severity: Major
Found in csfieldguide/static/js/codemirror-mode-regex.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return "g" + (++g % 5);
Severity: Major
Found in csfieldguide/static/js/codemirror-mode-regex.js - About 30 mins to fix

There are no issues that match your filters.

Category
Status