-
Notifications
You must be signed in to change notification settings - Fork 88
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
Developer Guide: php-cs-fixer #295
Comments
THX @mmattel for taking care! |
@settermjd referenced PR got merged. Removing Wait for PR. @DeepDiver1975 pls help creating the doc. You can just paste your text here and we will setup it properly. |
Copied link from talk: https://central.owncloud.org/t/introducing-php-cs-fixer/13163 |
Thanks @mmattel. I'll have this finalised this week. |
Adding https://github.com/owncloud/core/blob/master/.php_cs as reference for the current parameters. Maybe useful to others when documented. And https://veewee.github.io/blog/optimizing-php-performance-by-fq-function-calls/ as reference of the background and possible performance gains. (was in the core PR a link, just easier to doc it here too) |
Later on the code style references will be available here: https://github.com/owncloud/coding-standard We then need to see how much information needs to stay in the documentation - or if a link to a repository for further information makes more sense |
PR owncloud/core#31484 selects a (hopefully) better |
I just stumbled while writing a PR over a complaint of drone/php-cs-fixer. The code itself was fine. |
When you do:
It spits out output that includes the actual command line it is running:
To make it fix the things it finds, just take off the
Then when you When someone documents this thing, this can be included as a handy hint. |
The path given above |
Additional note made by experience: |
@mmattel, is this addressed now? |
We are trying to establish two make-file targets for the time being:
Example: |
Also note: We are moving towards segregating cli tool dependencies into This has the benefit, that tools can fetch their dependencies independently from the ownCloud app. As the CLI tool can have any dependency and not affect the app itself. |
@patrickjahns it would be great to start documenting these things, even not 100% ready or final. Currently there is nothing. I am lacking knowledge to write the text... |
@patrickjahns, when more concrete information's available, can you provide the core text for the docs, pls? |
One question is what to document. I guess we should document some links to the standard that is chosen (e.g. PSR-0, PSR-42, whatever) so that people have some idea what the style fixer is going to require/do. |
The coding standard is open and has its own repository - https://github.com/owncloud/coding-standard/ Latest cs-fixer configuration is to be found in the repository And yes - we shall not write more details then the configuration provides by default. Running the I do not see the point of updating a documentation for a changing part that will be clearly documented in code. 🤷♂️ |
This fixes #295, by adding a small, concise section on php-cs-fixer to the developer docs. Specifically, it shows how to review and fix coding standard violations using `make test-php-style` and `make test-php-style-fix` respectively.
Re-opening and assigning myself to write a few words about See PR #1976 |
This is a reminder that this needs to be documented in the developer guide when the referenced PR gets merged: owncloud/core#31198 (php-cs-fixer fix . --rules=native_function_invocation)
squizlabs/php_codesniffer
used on acceptance test code @phil-davisThe text was updated successfully, but these errors were encountered: