* Checks the current scope for unused parameters * Must be called in a function parameter scope
()
| 17156 | * Must be called in a function parameter scope |
| 17157 | */ |
| 17158 | function _checkParams() { |
| 17159 | var params = _current["(params)"]; |
| 17160 | |
| 17161 | if (!params) { |
| 17162 | return; |
| 17163 | } |
| 17164 | |
| 17165 | var param = params.pop(); |
| 17166 | var unused_opt; |
| 17167 | |
| 17168 | while (param) { |
| 17169 | var label = _current["(labels)"][param]; |
| 17170 | |
| 17171 | unused_opt = _getUnusedOption(state.funct["(unusedOption)"]); |
| 17172 | |
| 17173 | // 'undefined' is a special case for (function(window, undefined) { ... })(); |
| 17174 | // patterns. |
| 17175 | if (param === "undefined") |
| 17176 | return; |
| 17177 | |
| 17178 | if (label["(unused)"]) { |
| 17179 | _warnUnused(param, label["(token)"], "param", state.funct["(unusedOption)"]); |
| 17180 | } else if (unused_opt === "last-param") { |
| 17181 | return; |
| 17182 | } |
| 17183 | |
| 17184 | param = params.pop(); |
| 17185 | } |
| 17186 | } |
| 17187 | |
| 17188 | /** |
| 17189 | * Finds the relevant label's scope, searching from nearest outwards |
no test coverage detected