MCPcopy Index your code
hub / github.com/Macuyiko/minecraft-python / warnUnused

Function warnUnused

ServerEditorWeb/ace/worker-javascript.js:6982–7014  ·  view source on GitHub ↗
(name, tkn, type, unused_opt)

Source from the content-addressed store, hash-verified

6980 };
6981
6982 var warnUnused = function (name, tkn, type, unused_opt) {
6983 var line = tkn.line;
6984 var chr = tkn.from;
6985 var raw_name = tkn.raw_text || name;
6986
6987 if (unused_opt === undefined) {
6988 unused_opt = state.option.unused;
6989 }
6990
6991 if (unused_opt === true) {
6992 unused_opt = "last-param";
6993 }
6994
6995 var warnable_types = {
6996 "vars": ["var"],
6997 "last-param": ["var", "param"],
6998 "strict": ["var", "param", "last-param"]
6999 };
7000
7001 if (unused_opt) {
7002 if (warnable_types[unused_opt] && warnable_types[unused_opt].indexOf(type) !== -1) {
7003 if (!tkn.exported) {
7004 warningAt("W098", line, chr, raw_name);
7005 }
7006 }
7007 }
7008
7009 unuseds.push({
7010 name: name,
7011 line: line,
7012 character: chr
7013 });
7014 };
7015
7016 var checkUnused = function (func, key) {
7017 var type = func[key];

Callers 2

checkUnusedFunction · 0.85
itselfFunction · 0.85

Calls 1

warningAtFunction · 0.85

Tested by

no test coverage detected