SublimeLinter / SublimeLinter-phpmd

SublimeLinter plugin for php, using phpmd.
MIT License
15 stars 9 forks source link

Inc file extensions #25

Closed nkoporec closed 4 years ago

nkoporec commented 4 years ago

Is there a way to setup this package so that phpmd works with .inc,.module... extensions? Currently for me it only works with .php files.

kaste commented 4 years ago

Hm, should be possible. In an editor the extension of a file is irrelevant, what matters is the syntax and scopes from the syntax highlighter.

Open such a file and at row 0 col 0 press Ctrl+shift+alt+p to display the scope. Compare that to the php files. And probably post it here, or copy it to the selector setting in the SublimeLinter settings.

braver commented 4 years ago

You basically tell Sublime Text to open files with these extension with the PHP syntax. SublimeLinter doesn't care about filename, as kaste mentions it's the syntax that matters.

nkoporec commented 4 years ago

I setup the selectors in linter settings but it still does not work for file extensions such as .module,.theme.It now works for inc files though. Thanks!