-
Notifications
You must be signed in to change notification settings - Fork 51
implement new sniff to force spaces after =
#123
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
implement new sniff to force spaces after =
#123
Conversation
Travis-CI really doesn't like this patch at all: I'll push it up as a branch of this repo. |
"Some checks haven’t completed yet" :-/ |
If this is going to be the first custom code for the coding-standard, should it introduce the test environment like introduced in #63? |
I can add if you want |
Yes, we'd most likely need proper coverage for new code, highlighting how much we're covering (branch-related). The existing tests are for regression/integration, and don't give us this confidence. |
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 don't know much about writing own sniffs but given numer of tokens being registered I'd expect more tests than one assignment.
@malarzm yes, you are absolutely right! Thanks for mentioning this |
32f030c
tests/Doctrine/Sniffs/Arrays/data/operatorSpacingAfterSniff.errors.php
Outdated
Show resolved
Hide resolved
@Ocramius ok, I've done all the things, but one thing that doesn't work as expected is #123 (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.
@doctrine/coding-standard-approvers can I get your approvals/rejections in, please? I think further chore work should be deferred, unless it is something huge that wasn't spotted.
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.
Apart from missing newlines in some files it's 👍 from me
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.
Awesome! 👍
🤦♂️ yes, I see, I can fix it, but it will dismiss all of the reviews (don't want bother everyone yet another time) |
that's the way it is, no worries :) |
Can you retrigger Travis CI? |
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.
🎉🎉🎉
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.
🎉🎉🎉
a5cbd93
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.
Does this sniff works with:
$this->foo[$bar] =& $baz['quox'];
?
|
My bad, I was confusing this with |
@carusogabriel since there is #126 should I close this one? Or I need to make some changes here? |
@vladyslavstartsev Let's hold on this one until we get slevomat/cs v6 released, as well PHPCS v3.5 :) |
@carusogabriel sure! 👍 |
We have created similar sniff a while ago See I wonder whether it would be possible to maybe reuse it here in some way? |
@simPod Looks like an idea. I hoped that PHPCS v3.5 would bring a fix to #126, but it looks like that didn't happen. Unfortunately, we can't require Fell free to open a PR copying and pasting the sniff you created here if you allow us to use it, while we don't have the sniff of #126 ready to use 👍 |
Hi, I created the PR @carusogabriel requested, based on @simPod suggestion. Check it out here #134 :) |
I haven't yet found the rule that will help with that (since
MultipleStatementAlignmentSniff
doesn't work here)This PR/issue comes from this #103 (comment)
This is a copy of #117 as per #117 (comment)