diff options
Diffstat (limited to 'lint-json.js')
-rw-r--r-- | lint-json.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lint-json.js b/lint-json.js index 9884ccf..95f2f55 100644 --- a/lint-json.js +++ b/lint-json.js @@ -1,5 +1,6 @@ const osmBoundarySources = require('./osmBoundarySources.json') const zoneCfg = require('./timezones.json') +const expectedZoneOverlaps = require('./expectedZoneOverlaps.json') let numErrors = 0 @@ -37,6 +38,16 @@ Object.keys(sourcesUsage).forEach(source => { } }) +// Make sure all expected zone overlaps have a description +Object.keys(expectedZoneOverlaps).forEach(zoneOverlap => { + expectedZoneOverlaps[zoneOverlap].forEach((overlapBounds, idx) => { + if (!overlapBounds.description || overlapBounds.description.length < 3) { + numErrors++ + console.error(`Expected overlap #${idx} of zones ${zoneOverlap} missing description`) + } + }) +}) + if (numErrors > 0) { console.error(`${numErrors} errors found`) process.exit(1) |