{"id":1249,"date":"2022-09-28T11:12:02","date_gmt":"2022-09-28T11:12:02","guid":{"rendered":"https:\/\/mklasen.com\/?p=1249"},"modified":"2022-09-28T11:20:18","modified_gmt":"2022-09-28T11:20:18","slug":"wordpress-vs-code-code-sniffers-and-coding-standards-the-right-way","status":"publish","type":"post","link":"https:\/\/mklasen.com\/wordpress-vs-code-code-sniffers-and-coding-standards-the-right-way\/","title":{"rendered":"WordPress, VS Code, Code Sniffers and Coding standards: The Right Way"},"content":{"rendered":"\n
Every now and then I make a change in my development environment and.. I am back at re-configuring the whole setup.<\/p>\n\n\n\n
Let’s get that over with once and for all.<\/p>\n\n\n\n
This is my environment:<\/p>\n\n\n\n
The root of my workspace contains a And a That’s it! That should do the job!<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":" Every now and then I make a change in my development environment and.. I am back at re-configuring the whole setup. Let’s get that over with once and for all. The setup that works This is my environment: Visual Studio Code with PHP Sniffer by wongjn Composer with squizlabs\/php_codesniffer wp-coding-standards\/wpcs The root of my workspace […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[1],"tags":[],"acf":[],"yoast_head":"\nphpcs.xml<\/code> that looks as follows:<\/p>\n\n\n\n
\n
composer.json<\/code> file that sets the vendor dir to
app\/www\/vendor<\/code>, as follows:<\/p>\n\n\n\n
\"config\": {\n \"vendor-dir\": \"app\/www\/vendor\"\n}<\/code><\/pre>\n\n\n\n
Make sure you’re Workspace and General settings are empty!<\/h2>\n\n\n\n
.vscode\/settings.json<\/code> in your workspace and clear it<\/li>