Closed indigoxela closed 4 years ago
Done. It's impossible to fully comply the standards, though, for instance we can't simply rename existing classes and methods (camelcase).
Reopening this as @serundeputy was so kind to provide a .travis.yml config in a new PR:
Done. It's impossible to fully comply the standards, though, for instance we can't simply rename existing classes and methods (camelcase).
// @TODO: Rename classes to CamelCase in 2.x.
// @codingStandardsIgnoreLine
Regarding @codingStandardsIgnoreLine
: we'd need a lot of those, so I'm undecided yet.
Newer phpcs versions would allow to --exclude
sniffs via command line, but backdrop/coder requires old 1.5. Ever thought about upgrading? I'm aware this requires rewriting sniffs.
I think about upgrading ... I originally pinned that version to support php 5.3, but these days i'm less concerned about that, but worth noting that backdrop core still supports back to php5.3.
The travis builds/tests are not running. I'd recommend we go through and file PRs per directory.
i18n_forum; PR https://github.com/backdrop-contrib/i18n/pull/26
Nope, we have submodules, that should get completely ignored.
See https://github.com/backdrop-contrib/i18n/issues/1 for details.
In other words: don't waste time on something that we don't actually need. :wink:
Submodules to ignore:
The reason why they're still there is to figure out a migration path from D7.
ahh; ok; let me see about telling travis not to check those
ok; assuming these are legit failures: https://travis-ci.org/github/backdrop-contrib/i18n/builds/679360294
All those missing parameter types will be a bunch of work - it's sometimes hard to tell what the right type is in those nested functions... especially i18n_string is pretty complex.
I've left comments on your current PR.
A quick idea: instead of blocking phpcs on files containing classes with underscores even for local phpcs runs (via @codingStandardsIgnoreFile
), we could exclude them on the command line run in travisCI.
That way people don't get a test failure on things no one can fix in 1.x, but it's still possible to keep an eye on other violations when run locally.
@serundeputy what do you think?
Affected files:
That's a great idea!
Although coding standards will be an ongoing task, I'm closing this issue for now, as travisCI test is green.
Currently there are a lot of coding standard violations in many files.
Pretty code is readable and easier to maintain code. So this will be my next step.