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.
Drupal has coding standards as well as a tool to check for adherence, i.e. Coder.
However, Drupal.org does not provide a way to view this information.
Proposed Resolution
Use Code Climate (a free and open source platform, http://github.com/codeclimate/codeclimate) to generate this information.
This means adding a .codeclimate.yml file.
In addition to having Code Climate run PHPCS (coder) check, may I suggest also running PHPMD checks? There are some valuable checks, such as access to globals, complexity, and coupling.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2808731.patch | 616 bytes | josephdpurcell |
Comments
Comment #2
josephdpurcell CreditAttribution: josephdpurcell at Digital Bridge Solutions commentedIt turns out there already is a code climate yml in 8.x-1.x. This patch just tweaks it to be similar to https://www.drupal.org/node/2808733.
Comment #3
josephdpurcell CreditAttribution: josephdpurcell at Digital Bridge Solutions commentedSee also https://github.com/relaxedws/drupal-replication/pull/13
Comment #5
jeqqComment #6
josephdpurcell CreditAttribution: josephdpurcell at Digital Bridge Solutions commentedGreat! I've added the drupal.org link to Code Climate and you should be able to see results here: https://codeclimate.com/repos/57f26181e15679303d001016/feed (though I may need to add you to see them)
Also, the GitHub repo results should be able to be seen here: https://codeclimate.com/github/relaxedws/drupal-replication
As far as badges go, perhaps best to use the results from the drupal.org repo, which would be either of these:
Instead you could use the github.com badges:
Next step
You could add the badges to the README or to the d.o project page.
You can also now tie in pull requests to Code Climate. I believe you do this by going to /relaxedws/drupal-replication/settings/installations and selecting "Code Climate".
I'm excited to see how improvements evolve over time!
Comment #7
jeqqThank you Joseph! I've added the badge.