app/assets/javascripts/puffer/codemirror/yaml.js
Function token
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
token: function(stream, state) {
var ch = stream.peek();
var esc = state.escaped;
state.escaped = false;
/* comments */
Avoid too many return
statements within this function. Open
Open
return "atom";
Avoid too many return
statements within this function. Open
Open
if (state.inlinePairs > 0 && stream.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/)) { return 'number'; }
Avoid too many return
statements within this function. Open
Open
return 'meta';
Avoid too many return
statements within this function. Open
Open
return 'meta';
Avoid too many return
statements within this function. Open
Open
if (stream.match(/\s*-\s+/)) { return 'meta'; }
Avoid too many return
statements within this function. Open
Open
if (state.inlinePairs == 0 && stream.match(/^\s*-?[0-9\.\,]+\s?$/)) { return 'number'; }
Avoid too many return
statements within this function. Open
Open
return null;
Avoid too many return
statements within this function. Open
Open
return 'meta';
Avoid too many return
statements within this function. Open
Open
if (stream.match(/^\s*(\||\>)\s*/)) { state.literal = true; return 'meta'; };
Avoid too many return
statements within this function. Open
Open
if (stream.match(keywordRegex)) { return 'keyword'; }
Avoid too many return
statements within this function. Open
Open
if (state.pair && stream.match(/^:\s*/)) { state.pairStart = true; return 'meta'; }
Avoid too many return
statements within this function. Open
Open
if (stream.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i)) { return 'variable-2'; }