haringsrob / linter-drupalcs

Atom phpcs package build for Drupal
0 stars 1 forks source link

Linter not linting; add support for Linter API v2 #6

Open iamsophiesk opened 5 years ago

iamsophiesk commented 5 years ago

Following the update of Linter to 2.3.0, linter-drupalcs is no longer linting correctly.

See this issue about upgrading to v2 of the API

In the meantime, downgrading to Linter 2.2.0 seems to work: apm install linter@2.2.0

haringsrob commented 5 years ago

I think this project is no longer needed, you can configure your phpcs.xml in the root and just use the phpcs plugin.

brayfe commented 5 years ago

I'm having this same issue, but your suggestion doesn't make any sense. Where is the root location on Mac? And what do I need to change to "use the phpcs plugin"? If this project doesn't need Linter anymore, could we update it to get that dependency removed?

I love my drupalcs linter (as do over 2,000 people), and I'm bummed it stopped working. Thanks for all of your work on this amazing plugin!

iamsophiesk commented 5 years ago

Oh, I thought I had left a comment here, I didn't realise it didn't go through.

@haringsrob Do you have any docs about this? I know that some modules (Commerce) ship with a phpcs.xml file but it doesn't seem to pick it up reliably.

haringsrob commented 5 years ago

Please check https://www.drupal.org/docs/8/modules/code-review-module/installing-coder-sniffer

It basically comes to this:

composer global require drupal/coder:^8.3.1
composer global require dealerdirect/phpcodesniffer-composer-installer

Then set the standard in phpcs plugin to Drupal

brayfe commented 5 years ago

I have code sniffer and coder installed on my machine fine. I can run the commands via the command line and get errors, where there are none shown in Atom.

brayfe commented 5 years ago

This package still doesn't work for me within Atom. @haringsrob Any suggestions on why I no longer receive linter warnings within Atom? No errors, or anything appear, so it looks to be working, however, when I type blatant coding standards issues, nothing is picked up.

fabianfiorotto commented 5 years ago

@haringsrob I managed to add Drupal coding standards to phpcs but what I still miss is the ability to lint javascript files. This package used to do that really well. Do you know how to do this with any other package? Linting twig files also would be awesome.