Closed (won't fix)
Project:
Coder
Version:
7.x-2.x-dev
Component:
Coder Sniffer
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Aug 2012 at 10:04 UTC
Updated:
10 Oct 2016 at 11:46 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
klausiPatch/script is missing?
Comment #2
juampynr commentedHere it is. However, the symlink generates a dummy link like the following:
Apart from that, after running it you can see how the pre-commit hook fires the code sniffer.
If you want to test it, uninstall PHP Code Sniffer (sudo pear uninstall PHP_CodeSniffer), apply this patch and read the usage instructions.
Comment #3
juampynr commentedDoh! Here it is.
Comment #4
klausiDrupalcs has been merged into coder, moving this issue.
Comment #5
douggreen commentedI've added a hook_requirements check for PHP_CodeSniffer and started a drush command to install and configure it. I'd like to see more options, to allow things like adding the pre-commit hooks for git. See #1763674: Script to configure a git repository to use this project. I created the new issue because I am not yet doing git pre-commits, just hook_requirements and a drush install. But even so, can we mark this a duplicate?
Comment #6
douggreen commentedIMO, if we add pre-commit hooks, it should tie into drush coder-review and run all of the reviews ... but before we do this, I'd like to see us cleanup the reviews to things like "required", "suggested", "strict", etc... and the reviews might use the coder regex, grep, or sniffs.
Comment #7
douggreen commentedsorry, I didn't want to change this title ..
Comment #8
lars toomre commented@douggreen - What do we need to move reviews to categories like "required", "suggested", "strict", etc? Is there an issue for this reorganization? I did not see one.
Perhaps you could open the issue and detail what you are thinking so that we can start to work towards that?
I really like the idea of hvaing git pre-commit hooks that run Coder on a proposed piece of code and would like to see this feature in Coder 7.2/8.x. Thanks in advance.
Comment #9
douggreen commented@Lars #1835448: Re-organize reviews around importance rather than function
Comment #10
klausiCoder 7.x is frozen now and will not receive updates. Coder 8.x-2.x can be used to check code for any Drupal version, Coder 8.x-2.x also supports the phpcbf command to automatically fix conding standard errors. Please check if this issue is still relevant and reopen against that version if necessary.