MCPcopy Create free account
hub / github.com/conventional-changelog/commitlint / validate

Function validate

@commitlint/travis-cli/src/cli.ts:111–122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

109}
110
111function validate() {
112 if (process.env.CI !== "true" || process.env.TRAVIS !== "true") {
113 throw new Error(`@commitlint/travis-cli is intended to be used on Travis CI`);
114 }
115
116 const missing = REQUIRED.filter((envVar) => !(envVar in process.env));
117
118 if (missing.length > 0) {
119 const stanza = missing.length > 1 ? "they were not" : "it was not";
120 throw new Error(`Expected ${missing.join(", ")} to be defined globally, ${stanza}.`);
121 }
122}

Callers 3

mainFunction · 0.70
validateConfigFunction · 0.50
Process.test.tsFile · 0.50

Calls 1

filterMethod · 0.80

Tested by

no test coverage detected