Skip to content

Commit 6a828d6

Browse files
authored
[CI] Only report registry format errors by default (open-telemetry#4940)
1 parent 519f8f2 commit 6a828d6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

gulp-src/validate-registry.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const defaultGlobs = ['data/registry/*.yml'];
1010

1111
let numFilesProcessed = 0,
1212
numFilesWithIssues = 0;
13+
let debugFlag = false;
1314

1415
const schema = require('../data/registry-schema.json');
1516
const ajv = new Ajv({
@@ -125,7 +126,7 @@ function validateRegistryEntry(file, enc, cb) {
125126
console.log(
126127
`::${logLevel} file=${file.path},line=${lineNumber},endLine=${lineNumber},title=Registry Schema Validation::${error.message}`,
127128
);
128-
} else {
129+
} else if (debugFlag) {
129130
console.log(error);
130131
console.error(
131132
`${logLevel} in ${file.path}:${lineNumber}: ${error.message}`,
@@ -165,6 +166,7 @@ function validateRegistry() {
165166
if (argv.debug) {
166167
console.log('Globs being used:', globs);
167168
}
169+
debugFlag = argv.debug;
168170

169171
return gulp
170172
.src(globs, { followSymlinks: false })

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"check:links:internal": "npm run _check:links:internal",
4747
"check:links": "npm run _check:links",
4848
"check:markdown": "scripts/check-markdown-wrapper.sh",
49-
"check:registry": "npm run _check:registry",
49+
"check:registry": "npm run _check:registry -- ",
5050
"check:spelling": "npx cspell --no-progress -c .cspell.yml content/en data 'layouts/**/*.md'",
5151
"check:text": "npm run _check:text -- ",
5252
"check": "npm run seq -- $(npm run -s _list:check:*)",

0 commit comments

Comments
 (0)