Regression in indentation of multiline conditions
See original GitHub issueI noticed that with latest master the following code block
# do basic argument checks
if [ "$A" == "true" ] || [ "$A" == "false" ] || [ "$A" == "noconflicts" ] || \
[ "$B" == "true" ] || [ "$B" == "false" ] || [ "$B" == "noconflicts" ] || \
[ "$C" == "true" ] || [ "$C" == "false" ]; then
printerr "Internal error: invalid function call argument"
exit 2
fi
is now indented as:
# do basic argument checks
if [ "$A" == "true" ] || [ "$A" == "false" ] || [ "$A" == "noconflicts" ] || \
[ "$B" == "true" ] || [ "$B" == "false" ] || [ "$B" == "noconflicts" ] || \
[ "$C" == "true" ] || [ "$C" == "false" ]; then
printerr "Internal error: invalid function call argument"
exit 2
fi
3rd line has wrong indentation. I think this is perhaps a regression introduced with one of my latest patches, so I’m opening this to avoid forgetting.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Code-style for indention of multi-line 'if' statement? [duplicate]
Closed 9 years ago. When indenting long if conditions, you usually do something like this (actually, PyDev indents like that): if ...
Read more >Incorrect indenting of ternary with multi-line function calls ...
updated: Part 1a: Regression Tell us about your environment ESLint Version: v7.19.0 Node Version: v14.15.4 npm Version: 6.14.10 What parser ...
Read more >Use conditional statements to handle multi-line conditions
Sometimes I break long conditions in ifs onto several lines. ... However, it is the natural way using correct Python indentation of 4...
Read more >Multi-line rendering incorrectly on .gitlab-ci.yaml in "View File ...
Properly indent multi-line files when in "view" mode. Relevant logs and/or screenshots. image. Output of checks. Results of GitLab environment ...
Read more >9.1. Conditional Statements
A conditional statement is a multi-line statement that allows Python to choose among different ... which is a single line followed by an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes I conform it’s fixed. Now the block of code where the regression happened Is also in the unit tests 😃
So, can you confirm that this was fixed by #43?