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
Explicitly check for code style compliance against some standard at PR time #270
Comments
#265 has now been merged to give a basic PHP Mess Detector rule set. PSR-12 seems like a good standard to aim for as a baseline, as it's used by a number of large PHP projects. I suggest we add a simple
|
Correct to PSR-12 code style. See also GOCDB#270 Co-authored-by: gregcorbett <gregcorbett@users.noreply.github.com>
So after #365, codeSniffer on Codeclimate will check the code against PSR12? |
Theoretically. It seemed impossible to tell while I was just working on a branch. Might be able to check now. |
It's not clear to me what codacy and codeclimate are actually using as "the gold standard" of PHP code. Specifying a well known code standard is at least possible in codeclimate.
We also have a PHP Mess Detector config ruleset around (#265), and I like the fact we can use that to configure exceptions for things we are never going to change (variable names like
$em
for example). But with phpcodesniffer it seems we can aim for a standard, even if it tells us "the code is bad and you should feel bad" all the time. Perhaps another PHP linter / CI platform can do both.PSR-12: Extended Coding Style is a standard. Other standards may be available.
The text was updated successfully, but these errors were encountered: