Problem with uneven-indent rule
See original GitHub issueConsider following code snippet:
*** Settings ***
Documentation Suite doc
*** Keywords ***
My Keyword # robocop: disable
[Documentation] Some doc
No Operation
It does not report any issues. But if we change line 6th and decrease the number of spaces between the keyword name and the comment (which is a Robocop disabler) by 2, so the line looks like this:
My Keyword # robocop: disable
then we have this issue reported by Robocop:
indent_robocop.robot:7:5 [W] 1007 Line is over-indented (uneven-indent)
which should not happen.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Can't increase Indent on even numbered pages...
On my odd numbered pages, indenting works like it should. If I indent, it moves all of the text over, and the 10th...
Read more >What should I do with "Unexpected indent" in Python?
Here are some steps you can take to correct this: Copy the tabs or spaces that are causing the error.
Read more >Why doesn't my code work? Indentation Errors - YouTube
In this video, I answer that question with one type of possible error that is common to beginners in Python, indentation errors.
Read more >indentation - Stylelint
Always indent at-rules, rules, comments, declarations, inside parentheses and multi-line values by 2 spaces. The following patterns are considered problems:.
Read more >Indentation In Python - Indent Error Fix | Code Part Time
To fix Indent Error in Python, just follow one rule - You must use the same number of spaces throughout the code block;...
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 Free
Top 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

Fixed mentioned issues in linked PR.
@matusaurio I’ve created separate issue for your report - since I think it would be best to solve it by introducing new way of defining block disabler. See here #431
Thank you for data. The way it should be designed: both settings and node content (such as template args, keyworc calls) should use different ‘look ups’ for correct indent length. But it looks like it use the same look up. Look up is created by chosing most often used indent in given keyword. So:
That’s why it’s reporting under-indented issue when you remove one space -> because the next two lines are used as “most popular indent” to be compared to.