Skip to content

Commit

Permalink
Bugfix/invalid override enabled (#1223)
Browse files Browse the repository at this point in the history
* Usability of diktat-analysis: invalid override

### What's done:
- Corrected the order of inclusion of rules

(#1146)

Co-authored-by: Alexey Votintsev <alexeyvotintsev.yandex.ru>
  • Loading branch information
Arrgentum authored Mar 11, 2022
1 parent e8b4a51 commit 970f316
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ open class RulesConfigReader(override val classLoader: ClassLoader) : JsonResour
*/
@OptIn(ExperimentalSerializationApi::class)
override fun parseResource(fileStream: BufferedReader): List<RulesConfig> = fileStream.use { stream ->
yamlSerializer.decodeFromString(stream.readLines().joinToString(separator = "\n"))
yamlSerializer.decodeFromString<List<RulesConfig>>(stream.readLines().joinToString(separator = "\n")).reversed().distinctBy { it.name }
}

/**
Expand Down Expand Up @@ -153,11 +153,6 @@ data class CommonConfiguration(private val configuration: Map<String, String>?)
srcDirs
}

/**
* False if configuration has been read from config file, true if defaults are used
*/
val isDefault = configuration == null

companion object {
/**
* Counter that helps not to raise multiple warnings about kotlin version
Expand Down

0 comments on commit 970f316

Please sign in to comment.