Disable a few rules + edit the configurations in Formatting.yml, and add a parameter name to a lambda argument in ConfigScreen.kt

This commit is contained in:
Username404 2021-06-19 12:59:14 +02:00
parent cdedb65ab9
commit 1bd054c7c5
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
2 changed files with 15 additions and 6 deletions

View File

@ -14,9 +14,6 @@
valueParameter: true
collectionLiteral: true
- name: UNUSED_IMPORT
enabled: true
- name: CUSTOM_GETTERS_SETTERS
enabled: false
@ -27,6 +24,18 @@
alignedParameters: true
indentationSize: 4
- name: NO_BRACES_IN_CONDITIONALS_AND_LOOPS
enabled: false
- name: MAGIC_NUMBER
enabled: true
configuration:
ignoreEnums: true
ignoreExtensionFunctions: true
- name: CLASS_SHOULD_NOT_BE_ABSTRACT
enabled: false
- name: TYPEALIAS_NAME_INCORRECT_CASE
enabled: false

View File

@ -63,11 +63,11 @@ val SnowyConfigScreen: Screen get() {
macrosButtons.getTitleCommand()
).setInsertInFront(false).setDefaultValue(Configuration.foundMacros.getTitleCommand()).setErrorSupplier { list ->
supplyComponent(if (list.size > buttonsMax) "$confPrefix.general.macros.toomuchbuttons" else null)
}.setCellErrorSupplier {
with(it.split(":")) {
}.setCellErrorSupplier { cell ->
with(cell.split(":")) {
supplyComponent(
when {
isEmpty() || !it.contains(":") -> "$confPrefix.general.macros.missingdelimiter"
isEmpty() || !cell.contains(":") -> "$confPrefix.general.macros.missingdelimiter"
size < 2 -> "$confPrefix.general.macros.missingelement"
size > 2 -> "$confPrefix.general.macros.toomuchdelimiters"
first().count() > 16 -> "$confPrefix.general.macros.toomuchcharacters"