diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/data/yaml.js | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/data/yaml.js b/src/data/yaml.js index 0f73bdfb..f84f0378 100644 --- a/src/data/yaml.js +++ b/src/data/yaml.js @@ -8,8 +8,6 @@ import {inspect as nodeInspect} from 'node:util'; import yaml from 'js-yaml'; import {colors, ENABLE_COLOR, logInfo, logWarn} from '#cli'; -import {reportDuplicateDirectories, filterReferenceErrors} - from '#data-checks'; import {sortByName} from '#sort'; import {atOffset, empty, filterProperties, typeAppearance, withEntries} from '#sugar'; @@ -17,6 +15,12 @@ import Thing from '#thing'; import thingConstructors from '#things'; import { + filterReferenceErrors, + reportContentTextErrors, + reportDuplicateDirectories, +} from '#data-checks'; + +import { annotateErrorWithFile, decorateErrorWithIndex, decorateErrorWithAnnotation, @@ -1033,7 +1037,7 @@ export async function quickLoadAllFromYAML(dataPath, { linkWikiDataArrays(wikiData); try { - reportDuplicateDirectories(wikiData, {getAllFindSpecs}).close(); + reportDuplicateDirectories(wikiData, {getAllFindSpecs}); logInfo`No duplicate directories found. (complete data)`; } catch (error) { showAggregate(error); @@ -1048,6 +1052,14 @@ export async function quickLoadAllFromYAML(dataPath, { logWarn`Reference errors found. (partial data)`; } + try { + reportContentTextErrors(wikiData, {bindFind}); + logInfo`No content text errors found.`; + } catch (error) { + showAggregate(error); + logWarn`Content text errors found.`; + } + sortWikiDataArrays(wikiData); return wikiData; |