Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Part of meta-issue #1518116: [meta] Make Core pass Coder Review
Comment | File | Size | Author |
---|---|---|---|
#59 | interdiff.txt | 5.13 KB | alansaviolobo |
#59 | make_file_module_pass-1533236-59.patch | 136.46 KB | alansaviolobo |
#57 | interdiff.txt | 101.16 KB | alansaviolobo |
#57 | make_file_module_pass-1533236-57.patch | 141.07 KB | alansaviolobo |
#56 | interdiff.txt | 822 bytes | alansaviolobo |
Comments
Comment #1
scottalan CreditAttribution: scottalan commentedComment #2
TravisCarden CreditAttribution: TravisCarden commentedPostponing till feature freeze. If you want to help in the meantime, please work on the blockers on the meta issue. Thanks!
Comment #3
sphism CreditAttribution: sphism commentedWe have the go ahead with all these issues again, see #1518116: [meta] Make Core pass Coder Review for more details
Comment #4
sandergo90 CreditAttribution: sandergo90 commentedAttached to the issue you can find the patch for the file.module coding standards.
Comment #5
sandergo90 CreditAttribution: sandergo90 commentedComment #6
pfrenssenTypically, you would use "The file usage service" instead of "A file usage service".
I'm not sure if @param constant is correct. I grepped core and it is not used anywhere else. These constants map to integers, so you could use int. Try to find an example where this is used in core.
@param constant, as above.
@param constant, as above.
@param constant, as above.
'managed_file' is not the correct data type I think. This is an array probably.
This seems to introduce a whitespace error. There should be a space following the |= as it was originally. Is this a code sniffer false positive perhaps?
Anonymous functions should have a space between 'function' and the opening parenthesis.
@param constant, as above.
Comment #7
sandergo90 CreditAttribution: sandergo90 commentedI've created the patch again with the comments from pfrenssen corrected.
Comment #8
pfrenssenHere's the interdiff between patches #4 and #7. It is very much appreciated if you include these, as it makes reviewing easier. Will review the new patch now.
Comment #9
pfrenssenThanks for the corrections! I've looked through the patch again and found a few things that I missed last time:
Usually the last line of an array declaration ends in a comma, and the closing parenthesis is on the next line, like this:
Same as above.
This indentation is weird. I would move the two closing parentheses together like this:
));
Last line is indented two spaces too deep.
Comment #10
deepakaryan1988Comment #11
deepakaryan1988I have created patch for it.
Comment #12
Anonymous (not verified) CreditAttribution: Anonymous commentedThere were some further fixes needed to get
drush coder core/modules/file/ --no-empty
running without change proposals. I attached a patch that is based on #11 and fixes the remaining coder warnings.
Comment #13
TravisCarden CreditAttribution: TravisCarden commenteddrush drupalcs
, notdrush coder
.@param
and@return
type hinting has been descoped. To make the patch easier to review and to make it more likely to get committed, please remove those changes. Everyone who wants to contribute here, please be sure you're following the (current) initiative instructions.This isn't actually correct. It should be "A file usage backend.".
Comment #14
saki007sterComment #15
saki007sterre-rolled the patch
Comment #16
saki007sterComment #17
TravisCarden CreditAttribution: TravisCarden commentedA few things here:
Please address these issues so someone can productively perform a closer code review. Thanks!
Comment #18
Jalandhar CreditAttribution: Jalandhar commentedHi,
I had started working on coder reviews of File module.
Comment #19
Jalandhar CreditAttribution: Jalandhar commentedI have created a patch which solves all coder errors for file core module.
Please review it.
Comment #21
Jalandhar CreditAttribution: Jalandhar commentedAnother try at patch
Comment #23
Jalandhar CreditAttribution: Jalandhar commentedAnother try at patch
Comment #24
Jalandhar CreditAttribution: Jalandhar commentedComment #26
Jalandhar CreditAttribution: Jalandhar commentedRemoved the errors in comment #23 and updating the patch.
Comment #28
Jalandhar CreditAttribution: Jalandhar commentedHi,
Please review the patch attached here which fixes all the coder reviews.
Comment #29
LinL CreditAttribution: LinL commentedPatch no longer applies, tagging for reroll.
Comment #30
Jalandhar CreditAttribution: Jalandhar commentedHi LinL,
I have updated the patch with the required changes, Please review the patch attached.
Comment #31
Jalandhar CreditAttribution: Jalandhar commentedComment #32
Jalandhar CreditAttribution: Jalandhar commentedComment #33
rymo15: file-module-pass-coder-review-1533236-15.patch queued for re-testing.
Comment #35
rymo11: file-module-pass-coder-review-1533236-11.patch queued for re-testing.
Comment #36
rymo12: file-module-pass-coder-review-1533236-12.patch queued for re-testing.
Comment #37
rymo28: drupal-make_file_module_pass_coder_review-1533236-28.patch queued for re-testing.
Comment #38
rymo30: drupal-make_file_module_pass_coder_review-1533236-30.patch queued for re-testing.
Comment #43
LinL CreditAttribution: LinL commentedLooks like the patch needs another reroll following the PSR-4 changes.
More info here: https://groups.drupal.org/node/424758
Comment #44
g3r4 CreditAttribution: g3r4 commentedWill try to reroll this one
Comment #45
bfr CreditAttribution: bfr commentedI'll reroll it.
Comment #46
bfr CreditAttribution: bfr commentedLooks like simple reroll is not enough, i'll unassign for now and see if i have time later.
Comment #47
jsobiecki CreditAttribution: jsobiecki commentedComment #48
alansaviolobo CreditAttribution: alansaviolobo commentedComment #50
alansaviolobo CreditAttribution: alansaviolobo commentedComment #52
alansaviolobo CreditAttribution: alansaviolobo commentedComment #54
alansaviolobo CreditAttribution: alansaviolobo commentedComment #56
alansaviolobo CreditAttribution: alansaviolobo commentedComment #57
alansaviolobo CreditAttribution: alansaviolobo commentedran the latest code against coder module.
Comment #59
alansaviolobo CreditAttribution: alansaviolobo commentedThe coder module seems to be making a wrong suggestion to replace t() with $t = get_t();
Comment #60
xjmThanks for all the work here so far. See #1518116-86: [meta] Make Core pass Coder Review. This issue is postponed until the meta issue is either closed or reopened.
Comment #61
pfrenssenClosing in favor of #2571965: [meta] Fix PHP coding standards in core. In this issue the coding standards will be fixed on a sniff-per-sniff basis rather than a module-per-module basis.