SublimeLinter-phpcs icon indicating copy to clipboard operation
SublimeLinter-phpcs copied to clipboard

Look phpcs.xml from subdirectories

Open rollecode opened this issue 8 years ago • 3 comments

Hello! I do mainly WordPress themes with WordPress Theme Coding Standards and having bedrock-based setup where phpcs.xml is in subdirectory. standard: "" looks for current dir and up, but not in subdirectories. I have tried setting up standard: "content/themes/${project}/phpcs.xml" and standard: "content/themes/${folder}/phpcs.xml but it displays "No lint results.". The whole path for a project phpcs.xml is /Users/rolle/Projects/projectname/content/themes/themename/phpcs.xml and it would be preferred it to stay that way because our stack currently works best with this structure.

I could just copy phpcs.xml to the root directory use standard: "" OR change the standard line to be exactly specific every time I'm working on a project but I'd have to do that every time I switch project and it's not ideal...

Any suggestions on how to look phpcs.xml on subdirectory properly? didn't find this in any of the docs. Thanks in advance!

rollecode avatar Mar 06 '18 14:03 rollecode

${project} and ${folder} already resolve to absolute paths! There is ${project_name} though. Take a look here, cannot deep link 😞 , you have to scroll.

kaste avatar Mar 06 '18 15:03 kaste

Forgot the link 🤣 https://www.sublimetext.com/docs/3/build_systems.html

kaste avatar Mar 06 '18 15:03 kaste

Thank you a lot!

Fixed this with:

"standard": "${folder}/content/themes/${project_base_name}/phpcs.xml",

rollecode avatar Mar 06 '18 16:03 rollecode