non-YML language definitions are now ignored during build time
This commit is contained in:
parent
05385eeecc
commit
3be8e9626d
2 changed files with 8 additions and 0 deletions
|
|
@ -8,6 +8,10 @@ ext.convertDictionaries = { definitionsInputDir, dictionariesInputDir, dictionar
|
||||||
int errorCount = 0
|
int errorCount = 0
|
||||||
|
|
||||||
def errorStream = fileTree(dir: definitionsInputDir).getFiles().parallelStream().map { definition ->
|
def errorStream = fileTree(dir: definitionsInputDir).getFiles().parallelStream().map { definition ->
|
||||||
|
if (!definition.name.endsWith("yml")) {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
def (_, sounds, prependSoundsToWords, noSyllables, locale, dictionaryFile, langFileErrorCount, langFileErrorMsg) = parseLanguageDefintion(definition, dictionariesInputDir)
|
def (_, sounds, prependSoundsToWords, noSyllables, locale, dictionaryFile, langFileErrorCount, langFileErrorMsg) = parseLanguageDefintion(definition, dictionariesInputDir)
|
||||||
errorCount += langFileErrorCount
|
errorCount += langFileErrorCount
|
||||||
if (!langFileErrorMsg.isEmpty()) {
|
if (!langFileErrorMsg.isEmpty()) {
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,10 @@ ext.validateLanguageFiles = { definitionsDir, dictionariesDir, validationDir ->
|
||||||
int errorCount = 0
|
int errorCount = 0
|
||||||
|
|
||||||
def errorStream = fileTree(dir: definitionsDir).getFiles().parallelStream().map { definition ->
|
def errorStream = fileTree(dir: definitionsDir).getFiles().parallelStream().map { definition ->
|
||||||
|
if (!definition.name.endsWith("yml")) {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
if (errorCount >= MAX_ERRORS) {
|
if (errorCount >= MAX_ERRORS) {
|
||||||
return "Too many errors! Skipping: ${definition}\n"
|
return "Too many errors! Skipping: ${definition}\n"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue