Skip to content

Commit

Permalink
Skip validation for JMdict with examples
Browse files Browse the repository at this point in the history
  • Loading branch information
scriptin committed Oct 12, 2024
1 parent 1171edd commit c205765
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion node/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,13 @@ async function validateAll(baseDir) {
const files = readdirSync(baseDir).filter((f) => f.endsWith('.json'));
for (const file of files) {
const isJMdict = file.startsWith('jmdict');
const isWithExamples = file.includes('examples'); // Do not validate JMdict with examples
const isJMnedict = file.startsWith('jmnedict');
const isKanjidic = file.startsWith('kanjidic2');
const isKradfile = file.startsWith('kradfile');
const isRadkfile = file.startsWith('radkfile');
const isValidFile =
isJMdict || isJMnedict || isKanjidic || isKradfile || isRadkfile;
(isJMdict && !isWithExamples) || isJMnedict || isKanjidic || isKradfile || isRadkfile;
if (!isValidFile) continue;
console.log(`Validating ${file}...`);
try {
Expand Down

0 comments on commit c205765

Please sign in to comment.