-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
[Documentation] Squiz: Superfluous Whitespace #352
[Documentation] Squiz: Superfluous Whitespace #352
Conversation
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.
@jonmcp Thank you for taking on this sniff !
Aside from the inline notes, I noticed that the "Additional whitespace found at end of file" error is not documented. Could you please add the documentation for that ?
It's basically about whitespace found after a PHP close tag (without inline HTML contents after).
Nitpick: it looks like the CDATA close tag for all code samples is not indented ?
src/Standards/Squiz/Docs/WhiteSpace/SuperfluousWhitespaceStandard.xml
Outdated
Show resolved
Hide resolved
src/Standards/Squiz/Docs/WhiteSpace/SuperfluousWhitespaceStandard.xml
Outdated
Show resolved
Hide resolved
src/Standards/Squiz/Docs/WhiteSpace/SuperfluousWhitespaceStandard.xml
Outdated
Show resolved
Hide resolved
Thanks for the review, @jrfnl; I'll address your feedback today.
I found that the existing documentation didn't seem to agree on whether the closing CDATA tag should be indented or not, so I chose to follow the format of most of the other |
@jonmcp No worries about asking first, it's not a biggie, just something I noticed while reviewing.
That would be amazing! ❤️ I'm sure there will be plenty of inconsistencies as the docs haven't gotten much love over the last decade or so... Anything you can do to make them more consistent/improve them would be appreciated! |
- Add code comparison for a missed error code (EOF) - Fixup CDATA indentation - Clarify wording in code examples
Thanks @jrfnl! Once I've addressed feedback in my existing PRs, I'll prioritise normalising the existing sniff docs over creating new docs, so that it's easier going forward. I think I've addressed all of your current feedback in this PR, but I'm not sure what the correct etiquette is now. When I think a PR is ready for a re-review, would it be helpful for me to modify the labels on the PR, or is it best if I leave those alone? I did re-read the contribution guidelines, and couldn't see anything specific about labels or whatnot, but please forgive me if I've missed something there. I'd like to be as helpful as I can be without getting in the way! 🙂 |
@jonmcp I don't think you can adjust the labels, unless you have triage/commit access to the repo... or am I missing something ? If you would be able to update the labels, then removing the "Status: awaiting feedback" label would be the way to go. For PRs, I use that label to filter out PRs which have been reviewed and are waiting for an update/reply. I still mean to look into creating a GH Actions workflow to automatically remove that label when a PR has been updated and/or received a reply from the original author, but I haven't got round to that yet (well, I did look into it a bit and found that it probably wouldn't be easy to create, so I left it for now) Other than that, there's nothing for you to do, I have email notifications turned on for this repo, so I automatically get notified of updates and will look at them when I have time. |
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.
@jonmcp Thanks for making that update!
We're close, but the new section still needs work. I've left two notes inline.
src/Standards/Squiz/Docs/WhiteSpace/SuperfluousWhitespaceStandard.xml
Outdated
Show resolved
Hide resolved
src/Standards/Squiz/Docs/WhiteSpace/SuperfluousWhitespaceStandard.xml
Outdated
Show resolved
Hide resolved
You are indeed correct. I was hoping I might be able to help save a little time, but I ended up doing the opposite. Sorry about that, and thanks for your patience. |
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 @jonmcp for working on this and making those updates!
It all looks good to me now, so the docs will be included in the next release.
For the record: on the command-line the code samples don't always show a difference. This is due to the sniff being about whitespace and cannot be helped.
The text strings used within the code samples stating what is happening, should still illustrate this well enough and are a good solution for the docs for this particular sniff.
* Docs: add documentation for Squiz.WhiteSpace.SuperfluousWhitespace * Docs: improve documentation for Squiz.WhiteSpace.SuperfluousWhitespace - Add code comparison for a missed error code (EOF) - Fixup CDATA indentation - Clarify wording in code examples * Docs: fix typo in Squiz.WhiteSpace.SuperfluousWhitespace code example * Docs: rewrite incorrect code example for Squiz.WhiteSpace.SuperfluousWhitespace.EndFile * Squiz/SuperfluousWhitespace: tiny tweak
Description
This PR adds documentation for the
Squiz.WhiteSpace.SuperfluousWhitespace
sniff.Suggested changelog entry
Add documentation for the Squiz Superfluous Whitespace sniff
Related issues/external references
Part of #148
Types of changes
PR checklist