-
Notifications
You must be signed in to change notification settings - Fork 303
Give context about how many spaces were expected #722
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
Conversation
adrienverge
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, thanks for contributing!
It looks like the linter reported a line too long: can you check that?
When it's ready please squash everything into one commit (to be consistent and follow the guidelines it can be named comments: …).
yamllint/rules/comments.py
Outdated
| expected): | ||
| yield LintProblem(comment.line_no, comment.column_no, | ||
| 'too few spaces before comment') | ||
| f'too few spaces before comment, expected {expected}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- No need for a new variable, this will be good:
'too few spaces before comment, expected ' f'{conf["min-spaces-from-content"]}')
- Let's use a colon
:instead of,, to be consistent with other rules (likeindentationornew-lines).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, fixed now.
|
Hello, please reread my last review entirely! |
When telling someone that there are too few spaces before a comment it can be useful to include how many were expected.
|
Hit this issue today and came here to contribute exactly this. I hope it lands in a release soon, the current error message is terribly unhelpful. Thanks! |
|
Hello Preston, I just released it in yamllint version 1.37.1. |
When telling someone that there are too few spaces before a comment it can be useful to include how many were expected.