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

WordPress standard does not flag syntax issues in IDE, does in Terminal #2260

Open
smileBeda opened this issue Jun 22, 2023 · 0 comments
Open

Comments

@smileBeda
Copy link

I have a weird issue where after installed WPCS in Sublime Text it does work as expected but does not recognise for example = alignment errors or => alignment errors in the IDE (Neither it beautifies them), but it does recognise wrong indentation for example.

Also it recognises wrong alignments just fine in the terminal.

As an example:

$args = array(
				'post_type' => 'post',
				'posts_per_page' => 1,
				'meta_query' => array(
					array(
						'key' => 'blabla',
						'compare' => 'NOT EXISTS',
					),
				),
				'tax_query' => array(),
				'post_status' => 'publish',
				'orderby' => 'date',
				'order' => 'ASC',
			);

It should, but does not recognise the wrong => alignments. It does recognise them in terminal, weirdly.

Does anyone have a clue why this might be?
As said otherwise WPCS works just fine, it even recognises indentation issues, and beautifier works as well, just that it seems it does not use the full WordPress set, even if I declared it in the IDE Settings.

Ever stranger is that if I pass all subsets in the IDE settings, so not just WordPress but the whole bunch (even if they all should be part of WordPress) like so "--standard": "WordPress-Extra, WordPress-Docs, WordPress-Core, WordPress, WordPress-Core",, then the IDE console tells me ERROR: the " WordPress-Docs" coding standard is not installed. The installed coding standards are MySource, PEAR, PSR1, PSR2, PSR12, Squiz, Zend, WordPress, WordPress-Core, WordPress-Docs and WordPress-Extra

Well... it says WordPress-Docs is not there, but then says it is installed anyway. And, WordPress-Docs is not the one broken, it works just fine.

I have installed WPCS following these steps: #2001

Maybe someone can hint me what I am doing wrong?
(PS, in order to not waste the time of devs here, maybe it would be a good idea to open a discussion tab in this git project so users can help users without polluting the issues list?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants