MCPcopy Create free account
hub / github.com/ampproject/amphtml / isValidatorFile

Function isValidatorFile

build-system/pr-check/build-targets.js:100–109  ·  view source on GitHub ↗

* Checks if the given file is of the form validator-.*\.(html|out|out.cpponly|protoascii) * * @param {string} file * @return {boolean}

(file)

Source from the content-addressed store, hash-verified

98 * @return {boolean}
99 */
100function isValidatorFile(file) {
101 const name = path.basename(file);
102 return (
103 name.startsWith('validator-') &&
104 (name.endsWith('.out') ||
105 name.endsWith('.out.cpponly') ||
106 name.endsWith('.html') ||
107 name.endsWith('.protoascii'))
108 );
109}
110
111/**
112 * A dictionary of functions that match a given file to a given build target.

Callers 1

build-targets.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected