Update dictionary validation script (#1937)
This commit is contained in:
parent
ac12b50939
commit
9b86b5a56e
@ -84,16 +84,7 @@ function getSchemas() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async function main() {
|
async function testDictionaryFiles(dictionaryFileNames) {
|
||||||
const dictionaryFileNames = process.argv.slice(2);
|
|
||||||
if (dictionaryFileNames.length === 0) {
|
|
||||||
console.log([
|
|
||||||
'Usage:',
|
|
||||||
' node dictionary-validate <dictionary-file-names>...'
|
|
||||||
].join('\n'));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const schemas = getSchemas();
|
const schemas = getSchemas();
|
||||||
|
|
||||||
for (const dictionaryFileName of dictionaryFileNames) {
|
for (const dictionaryFileName of dictionaryFileNames) {
|
||||||
@ -114,10 +105,25 @@ async function main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
const dictionaryFileNames = process.argv.slice(2);
|
||||||
|
if (dictionaryFileNames.length === 0) {
|
||||||
|
console.log([
|
||||||
|
'Usage:',
|
||||||
|
' node dictionary-validate <dictionary-file-names>...'
|
||||||
|
].join('\n'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
await testDictionaryFiles(dictionaryFileNames);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (require.main === module) { main(); }
|
if (require.main === module) { main(); }
|
||||||
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
getSchemas,
|
getSchemas,
|
||||||
validateDictionary
|
validateDictionary,
|
||||||
|
testDictionaryFiles
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user