Closed (fixed)
Project:
Scheduler
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
26 Apr 2017 at 07:29 UTC
Updated:
27 Mar 2019 at 21:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jonathan1055 commentedThere are currently 189 coding standards messages over the entire codebase at PHP5.3 and 196 messages at PHP5.4+
This patch fixes tests/scheduler.test, which I want to be clean before adding more tests. Because the entire file is checked and all infringements reported, having it clean before adding new tests makes it easier to check that the additons are compliant.
Comment #5
jonathan1055 commentedAfter scheduler.test the standards messages reduced to 145.
Here's a patch for scheduler.admin.inc
Comment #6
jonathan1055 commentedIntersting that one coding standards message "Do not concatenate strings to translatable strings, they should be part of the t() argument and you should use placeholders" (Drupal.Semantics.FunctionT.ConcatString) is detected on d.o. running PHP5.3 but is allowed and not classed as a problem at PHP5.4+ (hence why it slipped through)
Comment #8
jonathan1055 commentedDown to 137 messages after fixing scheduler.admin.inc
Here's a patch for readme.txt, scheduler.api.php and scheduler.cron.inc
Comment #10
jonathan1055 commentedDown to 114 messages after fixing readme, api.php and cron.inc
Here's a patch for fixing .drush.inc, .edit.inc, .info and .install
Comment #12
jonathan1055 commentedDown to 102 now.
Here's a patch for .module
Comment #14
jonathan1055 commentedDown to 59 messages.
Patch for .rules.inc, rules_defaults.inc, tokens.inc and views.inc. Plus one 'drupal practice' fix for .install which was missed before.
Comment #16
jonathan1055 commentedNow only 28 messages left to fix.
Here's a patch for tests/scheduler_api.test and scheduler_handler_field_scheduler_countdown.inc (which also required a change in scheduler.views.inc).
This should be the last coding standards patch, but there may be one more for Drupal Practice. However, some of those suggestions may not be fixable.
Comment #18
jonathan1055 commentedRemaining coding standards messages: ZERO :-)
Comment #19
jonathan1055 commentedHere is a patch which fixes two of the three files with coding practice messages. As these are not reported in d.o. tests, the violations that this patch fixes are:
and
Comment #21
damienmckennaAny further work planned for this? You might just run phpcbf on the codebase and see what happens. I ran it and the only change that showed was on the JS file.
Comment #22
jonathan1055 commentedThanks for pointing this out. My
phpcsalias had a long list of--extensionsbut 'js' was missing, hence I never saw these.Interestingly my version reports different fixes to yours. I have
which yours did not fix. But the indentation and @see are not reported in my list.
Comment #24
jonathan1055 commentedNone of these are reported on d.o. testing.
Patch fixes 1 and 3 and sets to ignore 2 and 4.
Comment #26
jonathan1055 commented7.x coding standards and best practices now have no warnings on d.o. testbot output, running coder 7.x-2.6 and using drupalcs and drupalcsp.
So I think we can close this issue as fixed.