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:
parent
cdedb65ab9
commit
1bd054c7c5
|
@ -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
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue