Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support PHP Code Sniffer #19

Closed
josephdpurcell opened this issue Mar 25, 2019 · 2 comments
Closed

Support PHP Code Sniffer #19

josephdpurcell opened this issue Mar 25, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@josephdpurcell
Copy link
Collaborator

Add the ability to run the drupal-check with a flag that checks for PHP Code Style using the drupal/coder project.

@josephdpurcell josephdpurcell added the enhancement New feature or request label Mar 25, 2019
@mglaman mglaman added this to Needs triage in Issue triage May 3, 2019
@mglaman mglaman moved this from Needs triage to Needs Research in Issue triage May 3, 2019
@josephdpurcell
Copy link
Collaborator Author

Unassigning myself.

After looking into this, it looks like all files will have to be parsed twice, once by phpstan (drupal-check's parser) and once by phpcs's parser. So, there wouldn't be any performance benefit that I know of by including phpcs in drupal-check other than the advantage of having a single CLI that includes these multiple checks.

If this is completed, take a look at https://github.com/codeclimate/codeclimate-phpcodesniffer/blob/master/Runner.php#L80. How Code Climate is triggering phpcs might give some indication of how it can be done here.

Another thing to consider: how will you tell drupal-check to run drupal coder? Is it a binary state on whether to run it, or can you also pass arguments for directories to exclude, checks to disable, etc? I didn't see an easy way to modify the config files https://github.com/mglaman/drupal-check/tree/master/phpstan such that a user of drupal-check could provide their own config or pass flags in an easy way.

@josephdpurcell josephdpurcell removed their assignment Jun 12, 2019
@mglaman
Copy link
Owner

mglaman commented Feb 3, 2022

Reducing the scope of this project. Won't do.

@mglaman mglaman closed this as completed Feb 3, 2022
Issue triage automation moved this from Needs Research to Closed Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Issue triage
  
Closed
Development

No branches or pull requests

2 participants