Giter VIP home page Giter VIP logo

coder_review's Introduction

Coder Review

This is a developer Module that assists with code review so contributed modules can define additional review standards.

Built-in support for:

Coder Sniffer

See the README.txt file in the coder_sniffer directory.

Installation

Copy coder.module to your module directory and then enable on the admin modules page. Enable the modules that admin/config/development/coder/settings works on, then view the coder results page at coder.

Automated Testing (PHPUnit)

Coder Sniffer comes with a PHPUnit test suite to make sure the sniffs work correctly. Use Composer to install the dependencies:

composer install

Then execute the tests:

./vendor/bin/phpunit

License

This project is GPL v2 software. See the LICENSE.txt file in this directory for complete text.

Current Maintainers

Credits

Doug Green [email protected]

Solotandem - https://www.drupal.org/u/solotandem

coder_review's People

Contributors

das-peter avatar davereid avatar docwilmot avatar douggreen avatar dww avatar ericduran avatar klausi avatar oadaeh avatar robertgarrigos avatar serundeputy avatar snpower avatar solotandem avatar sun avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

coder_review's Issues

Incorrect notice for @see function_name()

Even-though comment lines like this contain function name including ():

* @see PollTestCase::_pollGenerateEdit().

it always gives a notice:

Line 135: @see should always be followed by a filename, a URL, class/interface name (optionally including method), or a function name including (). (Backdrop Docs) [comment_comment_see]

Update version number to match Drupal releases?

The latest Drupal 7 release of coder was version 7.x-2.6.
The current release of coder (works with all Drupal versions) is version 8.3.9

Should we create another release of coder_review that matches one of these Drupal version numbers, so that everyone knows which version of drupal's coder project this coder_review project aligns with? (I've been having a really hard time trying to track down where this was forked from, and what from the Drupal project has or has not already been included)

If we do change the version number, we should also rename the current branch to match.

Let's get PHP_CodeSniffer working with Backdrop

I am trying to get PHP_CodeSniffer working with Backdrop. So far I've got it installed on OS level by taking the following steps:

sudo pear channel-update pear.php.net
sudo pear install PHP_CodeSniffer
sudo ln -sv /var/www/docroot/modules/coder_review/coder_sniffer/Backdrop $(pear config-get php_dir)/PHP/CodeSniffer/Standards
sudo phpcs --config-set installed_paths /var/www/docroot/modules/coder_review/coder_sniffer
sudo phpcbf --config-set installed_paths /var/www/docroot/modules/coder_review/coder_sniffer

and now the both the phpcs -i and phpcbf -i commands output:

The installed coding standards are Squiz, Zend, MySource, PSR1, PEAR, PSR2, PSR12 and Backdrop

However, Backdrop is not picking up PHP_CodeSniffer and the status page still shows:

Coder Review 
PHP_CodeSniffer not installed. 
Coder review uses PHP_CodeSniffer to perform better code review checks; Code_Sniffer is not a requirement, but it is helpful. Use "drush install-php-code-sniffer" to help install.

Also running simple phpcs --standard=Backdrop -e command outputs the error:

docker@cli:/var/www/docroot/modules$ phpcs --standard=Backdrop -e

Fatal error: Class 'Generic_Sniffs_Strings_UnnecessaryStringConcatSniff' not found in /var/www/docroot/modules/coder_review/coder_sniffer/Backdrop/Sniffs/Strings/UnnecessaryStringConcatSniff.php on line 30

Call Stack:
    0.0011     371072   1. {main}() /usr/local/bin/phpcs:0
    0.0045     531672   2. PHP_CodeSniffer\Runner->runPHPCS() /usr/local/bin/phpcs:18
    0.0232     901376   3. PHP_CodeSniffer\Runner->init() /usr/local/lib/php/PHP/CodeSniffer/src/Runner.php:70
    0.0309    1138136   4. PHP_CodeSniffer\Ruleset->__construct() /usr/local/lib/php/PHP/CodeSniffer/src/Runner.php:332
    0.1454    1187120   5. PHP_CodeSniffer\Ruleset->registerSniffs() /usr/local/lib/php/PHP/CodeSniffer/src/Ruleset.php:217
    0.1455    1187120   6. PHP_CodeSniffer\Autoload::loadFile() /usr/local/lib/php/PHP/CodeSniffer/src/Ruleset.php:1156
    0.1458    1214456   7. include('/var/www/docroot/modules/coder_review/coder_sniffer/Backdrop/Sniffs/Strings/UnnecessaryStringConcatSniff.php') /usr/local/lib/php/PHP/CodeSniffer/autoload.php:167

docker@cli:/var/www/docroot/modules$ 

Any further hints would be appreciated on how to get PHP_CodeSniffer working with Backdrop.

Incorrect links to documentation

For the notices that include references to documentation, an incorrect domain name is used. The one that is used (backdrop.org) is for a BDSM site.
Also, the specific references are for drupal.org nodes, not backdropcms.org nodes, so just changing the domain name is not enough.

Move or remove non-development branches?

There are 5 branches on this repo that look as though they were accidentally pushed here (instead of to the author's forks).

If these branches exist both here and on the author's fork, then it will be safe to remove them from this repo. If not, we should keep them until they are either moved to the fork, merged, or closed, so that the work is not lost.

  • fix-backdrop-link
  • serundeputy-patch-1
  • ignore-vendor
  • cs
  • review

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.