Closed Animeshz closed 3 years ago
Hi @Animeshz , thanks for your feedback!
Regarding indentation errors - could you try to set extendedIndentAfterOperators
and extendedIndentBeforeDot
to false in indentation configuration, like this:
- name: WRONG_INDENTATION
enabled: true
configuration:
extendedIndentAfterOperators: false
extendedIndentBeforeDot: false
These parameters are true by default, so diktat expects 8 spaces after =
and 8 spaces before each dot-qualified call. Does it help or are there still unexpected errors?
Regarding WRONG_NEWLINES
- these errors are correct according to diktat code style, see rule about line breaks. So, .filterIsInstance
call should start on a new line because this is a chain of dot-qualified calls, and same goes for the line }.catch { logger.catching(it) }
- diktat tells you to insert a line break before .catch
too.
Describe the bug
Incorrect [WRONG_NEWLINES] and [WRONG_INDENTATION] lint warnings generated for single-expression functions
Here's an example of the this bug with the reported warnings:
Expected behavior
There should not be any warning.
Observed behavior
[WRONG_NEWLINES] and [WRONG_INDENTATION] lint warnings are generated.
Steps to Reproduce
Environment information