-
Notifications
You must be signed in to change notification settings - Fork 56
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
Custom extensions? #159
Comments
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#specifying-valid-file-extensions For our Dupal work, I was able to hack this by adding An idea may be to tie into It would be nice to get it to do CSS and JS files too >> #17 |
@bwaindwain Is there any update around this issue? phpcs used in VSC still does not track custom extensions |
no update |
Here's a quick reference for implementing the Drupal-specific fix in #159 (comment) File is most likely located in diff --git a/linter.js b/linter.js
index c8782e9..b6da7b7 100644
--- a/linter.js
+++ b/linter.js
@@ -109,6 +109,7 @@ class PhpcsLinter {
return [];
}
}
+ lintArgs.push('--extensions=inc,install,module,php,profile,theme');
lintArgs.push(`--error-severity=${settings.errorSeverity}`);
let warningSeverity = settings.warningSeverity;
if (settings.showWarnings === false) { |
Thank you @markfullmer |
I tested #159 (comment) and it works great. Thanks @markfullmer. |
Found another workaround to this, create a <arg name="extensions" value="php,module,inc,install,test,profile,theme,css,info,txt,md,yml"/> See https://github.com/pfrenssen/coder#store-settings-in-a-phpcsxmldist-file for sample file |
Phpcs supports the cli argument --extensions=foo,bar .
Is there a way I can pass the --extensions=phtml,php to work with phtml files?
Currently, I get no linting results for phtml files inside the editor :/
The text was updated successfully, but these errors were encountered: