Formatting
This commit is contained in:
parent
41ee3a7e58
commit
ce61923778
1 changed files with 6 additions and 6 deletions
|
@ -47,7 +47,7 @@ class LayerOverviewUtils {
|
||||||
errorCount.push("Layer " + layerJson.id + "still uses the old 'overpassTags'-format. Please use \"source\": {\"osmTags\": <tags>}' instead of \"overpassTags\": <tags> (note: this isn't your fault, the custom theme generator still spits out the old format)")
|
errorCount.push("Layer " + layerJson.id + "still uses the old 'overpassTags'-format. Please use \"source\": {\"osmTags\": <tags>}' instead of \"overpassTags\": <tags> (note: this isn't your fault, the custom theme generator still spits out the old format)")
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const layer = new LayerConfig(layerJson, AllKnownLayers.sharedUnits,"test", true)
|
const layer = new LayerConfig(layerJson, AllKnownLayers.sharedUnits, "test", true)
|
||||||
const images = Array.from(layer.ExtractImages())
|
const images = Array.from(layer.ExtractImages())
|
||||||
const remoteImages = images.filter(img => img.indexOf("http") == 0)
|
const remoteImages = images.filter(img => img.indexOf("http") == 0)
|
||||||
for (const remoteImage of remoteImages) {
|
for (const remoteImage of remoteImages) {
|
||||||
|
@ -152,7 +152,7 @@ class LayerOverviewUtils {
|
||||||
for (const layerFile of layerFiles) {
|
for (const layerFile of layerFiles) {
|
||||||
|
|
||||||
layerErrorCount.push(...this.validateLayer(layerFile.parsed, layerFile.path, knownPaths))
|
layerErrorCount.push(...this.validateLayer(layerFile.parsed, layerFile.path, knownPaths))
|
||||||
knownLayerIds.set(layerFile.parsed.id, new LayerConfig(layerFile.parsed,AllKnownLayers.sharedUnits))
|
knownLayerIds.set(layerFile.parsed.id, new LayerConfig(layerFile.parsed, AllKnownLayers.sharedUnits))
|
||||||
}
|
}
|
||||||
|
|
||||||
let themeErrorCount = []
|
let themeErrorCount = []
|
||||||
|
@ -213,11 +213,11 @@ class LayerOverviewUtils {
|
||||||
const errors = layerErrorCount.concat(themeErrorCount).join("\n")
|
const errors = layerErrorCount.concat(themeErrorCount).join("\n")
|
||||||
console.log(errors)
|
console.log(errors)
|
||||||
const msg = (`Found ${layerErrorCount.length} errors in the layers; ${themeErrorCount.length} errors in the themes`)
|
const msg = (`Found ${layerErrorCount.length} errors in the layers; ${themeErrorCount.length} errors in the themes`)
|
||||||
console.log ("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
console.log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
||||||
|
|
||||||
console.log(msg)
|
console.log(msg)
|
||||||
console.log ("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
console.log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
||||||
|
|
||||||
if (process.argv.indexOf("--report") >= 0) {
|
if (process.argv.indexOf("--report") >= 0) {
|
||||||
console.log("Writing report!")
|
console.log("Writing report!")
|
||||||
writeFileSync("layer_report.txt", errors)
|
writeFileSync("layer_report.txt", errors)
|
||||||
|
@ -230,4 +230,4 @@ class LayerOverviewUtils {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
new LayerOverviewUtils().main(process.argv)
|
new LayerOverviewUtils().main(process.argv)
|
Loading…
Reference in a new issue