Comments (3)
Seems that I need to set ktlint_standard_function-signature = enabled
instead, although this rule is listed as an experimental rule?
This is not clear to me reading the docs:
This setting only takes effect when rule function-signature is enabled.
Maybe its worth adding an example how to enable this?
from ktlint.
Seems that I need to set
ktlint_standard_function-signature = enabled
instead, although this rule is listed as an experimental rule?
There was already a kind of warning on top of the Experimental Rules documentation:
Would it be more clear if I change the last line this message as follows?
Or, when a specific experimental rule is provided in rule set with id
rule-set-id
, it can be enabled via .editorconfig propertyktlint_<rule-set-id>_<rule-id>
.
I will change all rule ids on the experimental and standard rules pages to the fully qualified rule id.
This is not clear to me reading the docs:
This setting only takes effect when rule function-signature is enabled.
Maybe its worth adding an example how to enable this?
This means that the experimental rule function-signature
needs to be enabled. Either enable all experimental rules or enable this specific rule.
from ktlint.
I think my first confusion is mostly because it was not clear if the rule ktlint_function_signature_body_expression_wrapping
is a standard rule or an experimental rule, since its listed under KtLint configuration
. I guess its neither of both.
However, I did not know how to translate this advice into a .editorconfig
:
This setting only takes effect when rule function-signature is enabled.
Maybe just add the following:
This setting only takes effect when rule function-signature is enabled (e.g. via
ktlint_standard_function-signature = enabled
in your.editorconfig
).
The second confusion was because of this sentence in the important box:
Or, when a specific experimental rule is enabled via
.editorconfig
propertyktlint_<rule-set-id>_<rule-id>
.
I am missing some information about what the rule-set-id
actual is. I though function-signature
is the rule-id
and since this is an experimental rule experimental
would be the rule-set-id
. But its ktlint_standard_function-signature
instead.
Is that because the first sentence in the box states?
Experimental rules in ktlint are part of the standard ruleset.
I think some pointer on what a rule-set-id
actually is would help to make it easier to understand the required config keys.
from ktlint.
Related Issues (20)
- False positive for AnnotationRule HOT 4
- Dependency Dashboard
- New `RuleId` value class mangled, preventing use in Java HOT 7
- Do not merge annotated expression with function signature rule
- ktlint should not fall over if ij_java_packages_to_use_import_on_demand or ij_kotlin_packages_to_use_import_on_demand is blank in .editorConfig HOT 6
- No braces added in multiline-if-else with dot qualified expression in else branche HOT 2
- Upgrade to Kotlin 1.9 && remove extension point
- Property naming rule reports anonymous object's instance variables should use the screaming snake case HOT 2
- java.lang.NoSuchFieldError: RANGE_UNTIL HOT 1
- Allow (or enforce) blank line after function declaration HOT 8
- Add FAQ about additional configuration options HOT 1
- IllegalStateException: Skipping rule(s) which are depending on a rule which is not loaded HOT 4
- Backing Property Name rule not work. HOT 4
- Add backing property examples to property-naming rule documentation
- Clarify parameter-list-wrapping in documentation HOT 1
- Repeat format step until no more errors are found which can be auto-corrected
- Wrap lambda argument in call expression if max-line-length is exceeded HOT 1
- Produce lint violations based on dry-run of format without changing the original source code HOT 1
- PR template issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ktlint.