Closed (won't fix)
Project:
Drupal core
Version:
8.0.x-dev
Component:
documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
16 Feb 2014 at 09:43 UTC
Updated:
29 Jul 2014 at 23:22 UTC
Jump to comment: Most recent
Comments
Comment #1
chx commentedComment #2
dawehnerWe did the same when we introduced views into core though improved over time. I think promising something similar is a pragmatic approach.
Comment #3
damienmckenna+1, provided follow-up issues are added for code cleanup.
Comment #4
larowlanFWIW A lot of the spacing type issues might be able to be auto-cleaned with phpcs v2 with the new fixer functionality and the sniff standards from the coder project (coder sniffer sub project), you could run it and use the interactive git add to choose what was worth fixing, then just ditch the rest. Our initial testing of it was positive.
Comment #5
btmash commentedIt makes a lot of sense provided followup issues for code cleanup, more tests.
Comment #6
chx commented#4 sure would address some of the spacing issues (I am not 100% it could deal with our dump files) but spaces was just an example I used. I just ran a quick search and found 87
function(no public/protected), 59 methods without doxygen (ag -B1 ' ^ .*function ' core/modules/migrate_drupal|grep -- '-$'|wc -l). To put that in perspective, the same quick search finds 537 methods in total.Comment #7
chx commentedComment #8
chx commentedComment #9
ianthomas_ukIf we're committing to fixing these coding standards problems, then I'd have thought it would be easier to do them before migrate is merged, on the basis that it's easier to get a patch committed to migrate than it is to core.
If we're not too bothered about the coding standard problems and don't mind if they are still around in a couple of years, then we should make this exception.
If automated tools can fix some easy ones then we may as well do that. Missing docblocks should probably be fixed, if only to help people who want to work on migrate in the future. Specifiying public/protected/private is definitely something better done sooner rather than later, because once people start using them it's hard to make them private.
If after that we've got some lines that are too long, or sentances missing their full stops, or whatever, then yeah, we should probably just commit it for the sake of progress and to more on to more important things.
Comment #10
xjmI definitely think the migrate merge shouldn't be blocked on coding standards violations, especially not legacy ones. Views still wouldn't be in core if we had done that.
On the other hand, I do think coding standards should be respected in new commits being made to migrate, before and after any merges. To do otherwise is adding technical debt and future cleanup overhead needlessly.
I also agree with what's been said above about just trying to clean up whatever's easy (using automated tools or by hand) while it's still in a sandbox, because it's far easier to do so in the sandbox than in the core queue workflow. TBH those sorts of cleanups are best made in a non-patch workflow anyway.
The one thing we should pay more attention to is the minimum docblock requirements. We defined those to help contributors distinguish between what is critical to explain code, vs. what is simply intended to improve readability and scannability.
Comment #11
chx commentedI am well aware of the minimal docblock requirements and it is exactly those I am asking an exception from... as the issue summary tries to explain as this is not a reusable API the docblocks should be much less necessary. This is just migrate_drupal not migrate. Obviously all standards apply to migrate.
Comment #12
webchickI'm -1 on this, but won't block it. I agree with others who've said that it's much easier to clean up these small whitespace or whatnot inconsistencies prior to commit into core. Especially since my understanding is there's an active migrate sprint happening right now at Drupal South.
And even though drupal_migrate is not an API, it is the only example core will ship with of how to write a migration from system X to system Y. That makes it arguably more important to get at least the docs gate right.
Comment #13
yesct commentedI'm plus 1 for not marking needs work for coding standards things that are not core gate minimums. But that's not an exception.
automated code styling cleanup sound fine to do now or later.
the sandbox has been speeding up things so they are not blocked on core commits...
but when coming into core, I think core gates minimums should guide us.
[edit: opened #2198733: core gates docs minimal requirements for next migrate merge with core ]
any core gates not met should get their own follow-up related issues to the issue that brings in the new migrate things so we can know and track what is still left to do (like tests, performance evaluation, etc...)
Comment #14
jhodgdonThe problem with saying "it can be done later" is that it usually isn't, especially when it comes to documentation. So if you're going to make an exception, my vote would be that you need to be clear that it's a *permanent* exception and make sure you're willing to live with it. Permanently.
So, figure out what the minimum you're willing to live with is, and make sure that much is done. For instance, if I were reviewing a patch for an issue called "fix up the docs for...", I would care about indentation in doc blocks, but maybe not in this case. It doesn't maybe matter too much. On the other hand, completely missing doc blocks and undocumented code that someone is going to have to maintain down the road and try to figure out what's going on would matter more, I would think.
And if an exception is being made to the Core Documentation Gate, or any of the other Gates, also be aware that you're opening the door to other initiatives to want to do the same in the future.
Comment #15
chx commented#2198733: core gates docs minimal requirements for next migrate merge with core YesCT and marvil07 took on to fix docs.