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
|
valueParameter: true
|
||||||
collectionLiteral: true
|
collectionLiteral: true
|
||||||
|
|
||||||
- name: UNUSED_IMPORT
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
- name: CUSTOM_GETTERS_SETTERS
|
- name: CUSTOM_GETTERS_SETTERS
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
|
@ -27,6 +24,18 @@
|
||||||
alignedParameters: true
|
alignedParameters: true
|
||||||
indentationSize: 4
|
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
|
- name: TYPEALIAS_NAME_INCORRECT_CASE
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
|
|
|
@ -63,11 +63,11 @@ val SnowyConfigScreen: Screen get() {
|
||||||
macrosButtons.getTitleCommand()
|
macrosButtons.getTitleCommand()
|
||||||
).setInsertInFront(false).setDefaultValue(Configuration.foundMacros.getTitleCommand()).setErrorSupplier { list ->
|
).setInsertInFront(false).setDefaultValue(Configuration.foundMacros.getTitleCommand()).setErrorSupplier { list ->
|
||||||
supplyComponent(if (list.size > buttonsMax) "$confPrefix.general.macros.toomuchbuttons" else null)
|
supplyComponent(if (list.size > buttonsMax) "$confPrefix.general.macros.toomuchbuttons" else null)
|
||||||
}.setCellErrorSupplier {
|
}.setCellErrorSupplier { cell ->
|
||||||
with(it.split(":")) {
|
with(cell.split(":")) {
|
||||||
supplyComponent(
|
supplyComponent(
|
||||||
when {
|
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.missingelement"
|
||||||
size > 2 -> "$confPrefix.general.macros.toomuchdelimiters"
|
size > 2 -> "$confPrefix.general.macros.toomuchdelimiters"
|
||||||
first().count() > 16 -> "$confPrefix.general.macros.toomuchcharacters"
|
first().count() > 16 -> "$confPrefix.general.macros.toomuchcharacters"
|
||||||
|
|
Loading…
Reference in New Issue