MCPcopy
hub / github.com/Tampermonkey/tampermonkey / warn

Function warn

src/jslint.js:1120–1148  ·  view source on GitHub ↗
(message, offender, a, b, c, d)

Source from the content-addressed store, hash-verified

1118 }
1119
1120 function warn(message, offender, a, b, c, d) {
1121 var character, line, warning;
1122 offender = offender || next_token; // ~~
1123 line = offender.line || 0;
1124 character = offender.from || 0;
1125 warning = {
1126 id: '(error)',
1127 raw: bundle[message] || message,
1128 evidence: lines[line - 1] || '',
1129 line: line,
1130 character: character,
1131 a: a || (offender.id === '(number)'
1132 ? String(offender.number)
1133 : offender.string),
1134 b: b,
1135 c: c,
1136 d: d
1137 };
1138 warning.reason = warning.raw.supplant(warning);
1139 JSLINT.errors.push(warning);
1140 if (option.passfail) {
1141 quit(bundle.stopping, line, character);
1142 }
1143 warnings += 1;
1144 if (warnings >= option.maxerr) {
1145 quit(bundle.too_many, line, character);
1146 }
1147 return warning;
1148 }
1149
1150 function warn_at(message, line, character, a, b, c, d) {
1151 return warn(message, {

Callers 15

warn_atFunction · 0.85
stopFunction · 0.85
expected_atFunction · 0.85
aintFunction · 0.85
add_labelFunction · 0.85
advanceFunction · 0.85
advance_identifierFunction · 0.85
jslint.jsFile · 0.85
one_spaceFunction · 0.85
one_space_onlyFunction · 0.85
no_spaceFunction · 0.85
no_space_onlyFunction · 0.85

Calls 1

quitFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…