-
-
Notifications
You must be signed in to change notification settings - Fork 35
Use brick's organization coding standards #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
Use brick's organization coding standards #62
Conversation
8246a26 to
43629f4
Compare
|
@BenMorel FYI I'm waiting for this to be merged and make sure it works as expected before opening the related PR to other brick projects |
|
@tigitz Thanks a lot! I now need to get a better picture of how things will fall into place when both Psalm & ECS will coexist in the coding-standards repo, and how this will translate into other repos such as |
|
@BenMorel digging a bit more about the inclusion of psalm as a shared tool for the org, I found that a Actually, doctrine doesn't share static analysis tools config nor versions https://github.com/doctrine/dbal/blob/3.3.x/composer.json#L45. Their coding standards repo is only meant for coding style tool. So if we want to do it for static analysis tools too, this would be the ideal setup IMO Splitting Another option I thought about was to have a single git repo From an usage POV, each brick library contributor would have to follow the same kind of instructions we have right now: # from project root
# coding style
composer install --working-dir=tools/coding-style
./tools/coding-style/vendor/bin/ecs check --config tools/coding-style/ecs.php
# static analysis
composer install --working-dir=tools/static-analysis
./tools/static-analysis/vendor/bin/psalm -c tools/static-analysis/psalm.xml If you're 👍 on the idea, could you please create the appropriate I'll start working on it right after. Thanks! |
|
@BenMorel friendly ping 😉 |
|
@tigitz Thank you for pursuing your work on this! I’m sorry I’m on vacation right now, and I’d like to think about this a bit more before multiplying dependencies; I’ll get back to you in ~1 week! Thanks for your patience! 👍 |
|
Hey @BenMorel, hope your vacations went well 🙂. If you can find some time to help moving this topic forward I'll be available. Thanks in advance. |
|
@BenMorel friendly ping :) |
43629f4 to
998dc36
Compare
998dc36 to
79e1373
Compare
|
I just rebased your PR, it seems to work fine, apart from the
This sounds weird to me, but it should disappear once we merge. Please tell me what you think about moving the skips to brick/coding-standard, and we can merge this! (let's merge with |
|
I made a few adjustments while testing
And it works perfectly. I think the defaults are very sensible: as you can see from the I think I can tag a I will not create a @tigitz, I'd like to thank you very much for the work you've done here, and apologize for how long it took me to get back to this. A shared coding standard for Brick repositories was long overdue, and will help move several repositories closer to their 1.0 release! |
|
Congrats Ben for this achievement. I'm glad I could help 🙂 |
6d17824 to
7b005f5
Compare
7b005f5 to
3722f82
Compare
|
Thank you, @tigitz! |

This aim to use the organization's coding standards.
Needs brick/coding-standard#2 to be merged to see green CI results.
I've tested it under my own forks as you can see here: https://github.com/tigitz/date-time/actions/runs/2536125238
Library's specific handling of coding standard rules are kept in library's
ecs.phpfile. It uses a$ecsConfig->import(__DIR__ . '/vendor/brick/coding-standards/ecs.php');to import the shared rules.I've included a missing
DuplicateSpacesSniffthat I wasn't able to push before the merging of the previous PR.