-
-
Notifications
You must be signed in to change notification settings - Fork 944
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
Document best practices for position arguments in utils.report()
#8257
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
I've opened an issue for this and added some initial thoughts |
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.
I am a bit unsure about this change.
On the one hand your change is obviously correct and it is a direction I think we want to promote for core rules. But word
is also very convenient for new rule authors.
Should we keep the documentation as-is for now and await the outcome of #8261 ?
#8251 this change might have just been an unlucky combo of linting at-rule names, where all the other and similar rules still use word
, despite being core rules :)
But I don't have a very strong opinion on this and happy with this change if you feel it is generally helpful to authors to already promote index
/endIndex
.
I agree with @romainmenke, |
SGTM. Let's rework this PR for that issue. |
index
in report()
utils.report()
I've reworked the docs based on @romainmenke excellent write-up in #8261 (comment). I tried to give rule authors a sense of how the location arguments work without getting into overwhelming detail so that they have some grounding when they look at the code of existing rules. I've given a couple of examples of what seem to be our most common patterns:
|
Co-authored-by: Gary Gozlan <Mouvedia@users.noreply.github.com>
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.
Thank you, almost LGTM. Can you check my minor comments?
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
@ybiquitous Commit your suggestions. Thank you for your attention to detail. |
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.
Thank you for working on this @jeddy3. LGTM 👍
Closes #8261
If someone has time, it may be worth adding a small section to the "writing rules" about the
report()
function to give examples of hownode
,index
andendIndex
are likely used.