You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all the example for the file docblock misses the empty line after the opening php tag:
<?php
/**
* @file
* Foo file does bar.
*/
Many of us use phpcs to verify coding standards, and the Drupal variant of coder requires that empty line, while the backdrop variant tolerates when it's missing.
Worse IMO is the section "Persistent Variables":
Persistent variables (variables/settings defined using Backdrop's variable_get()/variable_set() functions) should be...
In Backdrop variable_set/get is deprecated. The docs shouldn't list these, but provide config_set/get examples.
The text was updated successfully, but these errors were encountered:
If the Coder module doesn't flag a blank line before the @file docblock, then the Coder module should be updated to match our coding standards, not the other way around.
Another mismatch of coder sniffer for Backdrop and our docs...
...
What's the use of a tool, that validates different stuff than what's documented?
Yep. I think there are two reasons for this:
Nothing is perfect. There will always be bugs, oversights, etc.
The PHPCS code for Backdrop core lives in a contrib module. It's therefore up to the contrib module maintainer to make changes, keep it up-to-date, etc. For this reason, I have suggested that the PHPCS stuff be separated out into a separate repo in backdrop-ops. Not only will it then be easier to keep up-to-date, but modules that require it (like Coder Review or Drush) can depend on it without needing to duplicate it. Basically we should do the same thing @serundeputyhas done but in a more official capacity (or just ask if he can move his repo under backdrop-ops).
Our coding standard docs need some loving care.
First of all the example for the file docblock misses the empty line after the opening php tag:
Many of us use phpcs to verify coding standards, and the Drupal variant of coder requires that empty line, while the backdrop variant tolerates when it's missing.
Worse IMO is the section "Persistent Variables":
In Backdrop variable_set/get is deprecated. The docs shouldn't list these, but provide config_set/get examples.
The text was updated successfully, but these errors were encountered: