({ extension, handler, packageDisplayName, isTemplate,
archMatching })
| 132 | } |
| 133 | |
| 134 | addLegacyHandler({ extension, handler, packageDisplayName, isTemplate, |
| 135 | archMatching }) { |
| 136 | if (this._allowConflicts) { |
| 137 | throw Error("linters have no legacy handlers"); |
| 138 | } |
| 139 | |
| 140 | if (this._byExtension.hasOwnProperty(extension)) { |
| 141 | this._conflictError(packageDisplayName, |
| 142 | this._byExtension[extension].isopack.displayName(), |
| 143 | '*.' + extension); |
| 144 | // recover by ignoring |
| 145 | return; |
| 146 | } |
| 147 | if (this._legacyHandlers.hasOwnProperty(extension)) { |
| 148 | this._conflictError(packageDisplayName, |
| 149 | this._legacyHandlers[extension].packageDisplayName, |
| 150 | '*.' + extension); |
| 151 | // recover by ignoring |
| 152 | return; |
| 153 | } |
| 154 | this._legacyHandlers[extension] = |
| 155 | {handler, packageDisplayName, isTemplate, archMatching}; |
| 156 | } |
| 157 | |
| 158 | // Adds all the source processors (and legacy handlers) from the other set to |
| 159 | // this one. Logs buildmessage errors on conflict. Ignores packageDisplayName |
no test coverage detected