[BUG] can't turn off CodeSniffer

General discussion on Zend Studio

[BUG] can't turn off CodeSniffer

Postby strgt on Thu May 18, 2017 9:49 pm

Once you've finaly find out how to turn the CodeSniffer on, you'll see thousand of errors because all of the rules are very strict. Then, the next step you want to do is to turn it off, but you can't.

I tried different ways, and the most logical one was to unsellect ALL rules, but that didn't work neither.

You'll need a way to turn it on/off without uninstalling it.
strgt
 
Posts: 35
Joined: Sat Feb 21, 2009 1:50 pm

Re: [BUG] can't turn off CodeSniffer

Postby kaloyan_r on Fri May 19, 2017 2:39 pm

To make it work:
1. Go to the PHP Tools > PHP_CodeSniffer preference page.
2. Select PHP Executable. The "Built-in PHP" should work fine.
3. Select PEAR library: The "<Internal>" should work fine.
4. Select a CodeSniffer Standard, e.g. "Zend".
5. Click the OK button.
6. You will be prompted for that a full rebuild is required. Confirm with "Yes".

The CodeSniffer validation will appear in the code editor and in the Problems view.

To disable the CodeSniffer validation:
1. Go to the PHP Tools > PHP_CodeSniffer preference page.
2. Deselect all items in the CodeSniffer Standards list.
3. Click the OK button.
4. You will be prompted for that a full rebuild is required. Confirm with "Yes".

The CodeSniffer validation will disappear from the code editor and the Problems view.

I've just checked the above with Zend Studio 13.6. If it does not work for, please provide more details.
Kaloyan Raev
Zend Studio Team
User avatar
kaloyan_r
Zend Product Manager
 
Posts: 582
Joined: Thu May 23, 2013 12:40 pm

Re: [BUG] can't turn off CodeSniffer

Postby strgt on Fri May 19, 2017 3:16 pm

kaloyan_r wrote:To disable the CodeSniffer validation:
1. Go to the PHP Tools > PHP_CodeSniffer preference page.
2. Deselect all items in the CodeSniffer Standards list.
3. Click the OK button.
4. You will be prompted for that a full rebuild is required. Confirm with "Yes".

The CodeSniffer validation will disappear from the code editor and the Problems view.

I've just checked the above with Zend Studio 13.6. If it does not work for, please provide more details.


It did not. I deselected all items in the standards list and rebuilt the project. The standard rules errors were still shown. What details would you like me to add?
strgt
 
Posts: 35
Joined: Sat Feb 21, 2009 1:50 pm

Re: [BUG] can't turn off CodeSniffer

Postby kaloyan_r on Mon May 22, 2017 8:24 am

It would help if you attach a screenshot of the preferences dialog and screenshot of the Problems view (in the state where it is supposed to not show CodeSniffer validation, but it still shows it).
Kaloyan Raev
Zend Studio Team
User avatar
kaloyan_r
Zend Product Manager
 
Posts: 582
Joined: Thu May 23, 2013 12:40 pm

Re: [BUG] can't turn off CodeSniffer

Postby strgt on Mon May 22, 2017 12:58 pm

CodeSniffer issues did not get solved with a new workspace.

This is the image of the problems view with the PHPCS errors in the editor

Image

And this is the preferences window with no standard selected

Image
strgt
 
Posts: 35
Joined: Sat Feb 21, 2009 1:50 pm

Re: [BUG] can't turn off CodeSniffer

Postby kaloyan_r on Mon May 22, 2017 4:31 pm

So, I assume that you hit "Yes" when you were asked for the full rebuild, and there aren't any background jobs still running.

The only difference I see with my setup is that I am using the "<Internal>" PEAR library that is built in Zend Studio, while you have configured your own instance. Could you try with the "<Internal>" PEAR library?
Kaloyan Raev
Zend Studio Team
User avatar
kaloyan_r
Zend Product Manager
 
Posts: 582
Joined: Thu May 23, 2013 12:40 pm

Re: [BUG] can't turn off CodeSniffer

Postby strgt on Mon May 22, 2017 9:34 pm

kaloyan_r wrote: Could you try with the "<Internal>" PEAR library?



Same result. The only way I was able to get rid of the PHPCS errors was with the following filters:
- File Extensions: *.ignoreAll
- Ignore directories: *
strgt
 
Posts: 35
Joined: Sat Feb 21, 2009 1:50 pm


Return to Zend Studio

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 2 guests

cron