Currently the 8.x-1.x-dev version has 34 coding standards messages (https://www.drupal.org/pift-ci-job/1182713) which:
a) is not nice
b) sets any new patch to "Needs Work" by default, even if it isn't causing the coding standards messages.
Let's see if we can fix them.
Also there's a patch file committed in the Module's root-dir (Group_function_on_custom_field-2986045-19.patch). That shouldn't be there.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | fix_coding_standards_messages-3028732-9.patch | 8.87 KB | jordik |
| #8 | fix_coding_standards_messages-3028732-8.patch | 8.83 KB | jordik |
| #3 | fix_coding_standards_messages-3028732-2.patch | 15.54 KB | spokje |
Comments
Comment #2
tr commentedThe "Needs work" is a testbot problem, when it didn't find any tests (because there aren't any!). It's not because of coding standards.
See #2990645: "Build Successful" is treated as a test failure
Coding standards problems don't cause test failures. But yes, it would be nice to fix them. (There are only 34 ...) Not all of the reported violations should be fixed however - you have to use some discretion.
Comment #3
spokjePatch attached.
Comment #4
spokjeComment #5
tr commentedFor example, your change to README.txt - that code sample should be left indented. Also, commented out code will generate some violations, but should not be removed or modified just to satisfy coder.
Also, the patch should be ONLY coding standards - please refrain from making structural changes like you did with the conditional statements. Those should be handled in a different issue. (And the removal of the patch file already has an issue open, so that should not be included here ...)
You should use your modified version of the module for a while - I'm pretty sure adding the type hints to functions not defined by this module will cause problems because adding a type hint changes the function signature so the function won't match how it's defined in core
Comment #6
spokje@TR Thanks for clearing that up.
7 messages left, they're all PHPDoc related.
I don't feel knowledgeable enough about this module to enter some docs that make sense and I happily leave that with people who are.
Setting this to "Needs Work".
Comment #7
spokje@TR Our comments just crossed, didn't see yours before I post mine.
I'm perfectly fine with anybody changing this patch, I'm moving on to other things.
Comment #8
jordik commentedHere an updated patch, matching latest dev version.
Comment #9
jordik commentedAnother iteration.
Comment #10
jordik commentedRemaining coding errors left intentionally. Committing.
Comment #12
jordik commented