-
Notifications
You must be signed in to change notification settings - Fork 9
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
Errors outputting to sublime console, but no styles being applied to editor / empty diagnostics panel #28
Comments
Hm, I would expect some lines with "No match for line ..." in the console output. That would indicate that our regex can't parse the output format of phpmd. I guess "phpcs" is working so the setup/install of SublimeLinter itself is working as well. You can of course have a post-filter applied (e.g. the plugin/addon SublimeLinter-addon-filter can do this). Maybe post the console output. |
Hey @kaste, Thank you for the quick response. I should have included those logs in the initial report. It is actually is logging a ton of "No match for file..." Here are some log examples I'm seeing: (Linter command)
(STDOUT)
(No match)
|
Yeah, that's not the formatting we expect here. We have a very simple regex
You probably set that somewhere as usually the linters don't change defaults as it would break anyone. Or did they: we run That said your formatting is also better as it has column information in it. |
I can write custom regex for the diagnostics panel, but shouldn't there still be some sort of output in the buffer / gutter where the errors are being found, or do I misunderstand how the package is set up to work? |
It works like this: we run the linter, grab its output, parse it line-by-line to get a standardized form of each error. These are then stored in the store, and various "views" react to that: they draw squiggles or show them in the bottom panel when open, or in the status bar or in a tooltip on hover etc. You can't write a custom regex though. The regex is the same for all users. The question is why you have such a format. The |
Would you be comfortable sharing your Also, feel free to send it to me on the Sublime Discord if that's easier. |
I actually don't have a As we explicitly ask for the text format, see their tests of how that should look like: https://github.com/phpmd/phpmd/blob/e9c0e1f47a391c54e473ddde783ccbf22e2d457c/src/test/php/PHPMD/Renderer/TextRendererTest.php#L68-L72 (Now, we should probably also extract the rule names as separate entities and not as part of the message but that's a completely other point.) |
Issue
With the debug enabled, I can see that the package is formatting the command correctly (i.e.,
index.php text cleancode,codesize,controversial,design,naming,unusedcode
), and the errors and warnings are outputting to the Sublime console exactly as they are if I run the command directly in my terminal.However, no "error" or "warning" styles are being applied to the buffer, nor is anything outputting to the diagnostics panel via SublimeLinter --> Open diagnostics panel
Setup
Sublime 4169
SublimeLinter 4.23.5
SublimeLinter-phpmd 1.3.0
User config
The text was updated successfully, but these errors were encountered: