MCPcopy Create free account
hub / github.com/appium/appium / constructor

Method constructor

packages/docutils/lib/validate.ts:138–156  ·  view source on GitHub ↗

* Creates a listener to track errors emitted

(opts: DocutilsValidatorOpts = {})

Source from the content-addressed store, hash-verified

136 * Creates a listener to track errors emitted
137 */
138 constructor(opts: DocutilsValidatorOpts = {}) {
139 super();
140
141 this.pythonPath = opts.pythonPath;
142 this.cwd = opts.cwd ?? process.cwd();
143 this.mkDocsYmlPath = opts.mkdocsYml;
144
145 if (opts.python) {
146 this.validations.add(NAME_PYTHON);
147 }
148 if (opts.mkdocs) {
149 this.validations.add(NAME_MKDOCS);
150 }
151
152 // this just tracks the emitted errors
153 this.on(DocutilsValidator.FAILURE, (err: DocutilsError) => {
154 this.emittedErrors.set(err.message, err);
155 });
156 }
157
158 /**
159 * Runs the configured validations, then resets internal state upon completion or rejection.

Callers

nothing calls this directly

Calls 2

setMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected