-
Notifications
You must be signed in to change notification settings - Fork 5
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
Coding style #16
Comments
To prevent such clean-ups like in threema-ch/threema-msgapi-sdk-php@44073c2 I would recommend to add a Contributing.md where you can define everything which should or shouldn't be done when contributing to this project. More information: https://help.github.com/articles/setting-guidelines-for-repository-contributors/ imported from |
+1 by @threema-ch |
Nice you like it - you just need to add it... 😃 The first thing e.g. would be 'use tabs instead of spaces' (although I don't like that, because it's basically the opposite of which is recommend by the PSR-2 standard). imported from |
Additionally you may also add a configuration file for a tidy/beautifier/fixer script, which cleans the code automatically and makes sure the right code styling is used. I don't know what tools you use (which seems to refuse to indent this line), but I can recommend the php-cs-fixer. It has predefined PSR-n rules, but you can also customize it by yourself (with a PHP file). imported from |
So I added at least an |
As part of the contribution guide we have to set some guidelines for contributing.
However currently there are already some minor style errors where several code analysers complain about (like the usage of tabs or that many brackets are not on a single line), so possibly we want to fix this before, so that we can later add this to the guidelines.
I would be very keen to run PHP-CS-fixer and add a suitable configuration file to the repo. However this would of course change much things, so I do want to discuss this before.
So @medienverbinder what do you think about it?
The text was updated successfully, but these errors were encountered: