Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More bugs in IndentationRule #349

Closed
petertrr opened this issue Oct 2, 2020 · 0 comments · Fixed by #376
Closed

More bugs in IndentationRule #349

petertrr opened this issue Oct 2, 2020 · 0 comments · Fixed by #376
Assignees
Labels
bug Something isn't working

Comments

@petertrr
Copy link
Member

petertrr commented Oct 2, 2020

  • Indentation is not increased after an arrow in when expression
  • ?: on a start of a new line should be indented like elements in a chain of calls
  • code
        constructor(resourceFilePath: String,
                    ruleSupplier: (rulesConfigList: List<RulesConfig>) -> Rule,
                    rulesConfigList: List<RulesConfig>? = null,
                    cb: (LintError, Boolean) -> Unit = defaultCallback) : this(resourceFilePath,
            { overrideRulesConfigList -> DiktatRuleSetProvider4Test(ruleSupplier, overrideRulesConfigList) }, cb, rulesConfigList)
    
    get fixed to
        constructor(resourceFilePath: String,
                                         ruleSupplier: (rulesConfigList: List<RulesConfig>) -> Rule,
                                         rulesConfigList: List<RulesConfig>? = null,
                                         cb: (LintError, Boolean) -> Unit = defaultCallback) : this(resourceFilePath,
            { overrideRulesConfigList -> DiktatRuleSetProvider4Test(ruleSupplier, overrideRulesConfigList) }, cb, rulesConfigList)
    
  • when there are comments in dot-calls chain, indentation of statement right after a comment is too long
  • exceptional indentation is broken after a comment, even though it should spread on the statement after comment
@petertrr petertrr added the bug Something isn't working label Oct 2, 2020
@petertrr petertrr self-assigned this Oct 2, 2020
@petertrr petertrr changed the title Indentation is not increased after an arrow in when expression More bugs in IndentationRule Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant