(license, prefix, errors, required)
| 179 | } |
| 180 | |
| 181 | function validateLicense(license, prefix, errors, required) { |
| 182 | if (license === undefined) { |
| 183 | if (required) { |
| 184 | errors.push(`${prefix}: "license" is required`); |
| 185 | } |
| 186 | return; |
| 187 | } |
| 188 | |
| 189 | if (!isNonEmptyString(license)) { |
| 190 | errors.push(`${prefix}: "license" must be a non-empty string`); |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | function validateRepository(repository, prefix, errors, required) { |
| 195 | if (repository === undefined) { |
no test coverage detected