Revert "Add temporary fixMeExtensions to pass test on extensions check"
KTI-267
This commit is contained in:
@@ -117,13 +117,12 @@ class CodeConformanceTest : TestCase() {
|
|||||||
fun testForgottenBunchDirectivesAndFiles() {
|
fun testForgottenBunchDirectivesAndFiles() {
|
||||||
val root = File("").absoluteFile
|
val root = File("").absoluteFile
|
||||||
val extensions = File(root, ".bunch").readLines().map { it.split("_") }.flatten().toSet()
|
val extensions = File(root, ".bunch").readLines().map { it.split("_") }.flatten().toSet()
|
||||||
val fixMeExtensions = setOf("191", "as35")
|
|
||||||
val failBuilder = mutableListOf<String>()
|
val failBuilder = mutableListOf<String>()
|
||||||
for (sourceFile in FileUtil.findFilesByMask(SOURCES_BUNCH_FILE_PATTERN, root)) {
|
for (sourceFile in FileUtil.findFilesByMask(SOURCES_BUNCH_FILE_PATTERN, root)) {
|
||||||
if (EXCLUDED_FILES_AND_DIRS.any { FileUtil.isAncestor(it, sourceFile, false) }) continue
|
if (EXCLUDED_FILES_AND_DIRS.any { FileUtil.isAncestor(it, sourceFile, false) }) continue
|
||||||
|
|
||||||
val matches = Regex("BUNCH (\\w+)").findAll(sourceFile.readText())
|
val matches = Regex("BUNCH (\\w+)").findAll(sourceFile.readText())
|
||||||
.map { it.groupValues[1] }.toSet().filterNot { it in extensions || it in fixMeExtensions }
|
.map { it.groupValues[1] }.toSet().filterNot { it in extensions }
|
||||||
for (bunch in matches) {
|
for (bunch in matches) {
|
||||||
val filename = FileUtil.toSystemIndependentName(sourceFile.absoluteFile.toRelativeString(root))
|
val filename = FileUtil.toSystemIndependentName(sourceFile.absoluteFile.toRelativeString(root))
|
||||||
failBuilder.add("$filename has unregistered $bunch bunch directive")
|
failBuilder.add("$filename has unregistered $bunch bunch directive")
|
||||||
|
|||||||
Reference in New Issue
Block a user