* Runs the configured validations, then resets internal state upon completion or rejection.
()
| 159 | * Runs the configured validations, then resets internal state upon completion or rejection. |
| 160 | */ |
| 161 | public async validate() { |
| 162 | try { |
| 163 | this.emit(DocutilsValidator.BEGIN, [...this.validations]); |
| 164 | |
| 165 | if (this.validations.has(NAME_PYTHON)) { |
| 166 | await this.validatePythonVersion(); |
| 167 | await this.validatePythonDeps(); |
| 168 | } |
| 169 | |
| 170 | if (this.validations.has(NAME_MKDOCS)) { |
| 171 | await this.validateMkDocs(); |
| 172 | await this.validateMkDocsConfig(); |
| 173 | } |
| 174 | |
| 175 | this.emit(DocutilsValidator.END, this.emittedErrors.size); |
| 176 | } finally { |
| 177 | this.reset(); |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | /** |
| 182 | * If a thing like `err` has not already been emitted, emit |
no test coverage detected