FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Ignore the filename phpcs reports by BasCostBudde · Pull Request #62 · SublimeLinter/SublimeLinter-phpcs · GitHub

Ignore the filename phpcs reports - #62

Merged
kaste merged 5 commits into
SublimeLinter:masterfrom
BasCostBudde:master
Sep 16, 2025
Merged

Ignore the filename phpcs reports#62
kaste merged 5 commits into
SublimeLinter:masterfrom
BasCostBudde:master

Conversation

BasCostBudde commented Sep 15, 2025
edited by kaste
Loading

Copy link
Copy Markdown
Contributor

Fixes SublimeLinter/SublimeLinter#1988
Fixes #61

phpcs heavily uses realpath and reports "resolved" file paths to the end-user. We believe that the linter actually only reports for the file at hand so not passing or parsing the reported filename should be totally okay. Alternative: report "-" as filename to SublimeLinter which means "this file" per convention.

vim/Ale also ignores the reported filename.

kaste commented Sep 15, 2025

Copy link
Copy Markdown
Member

Love the prose but shouldn't we try a fix like mentioned in the original issue?

Copy link
Copy Markdown
Contributor Author

I agree that fixing the issue is better than putting up a sign. I do not know how to proceed though, this is my first attempt to submit an issue, and while I'm somewhat of a php developer, I do hardly know any python and would not know how to create the environment to test this in.

kaste commented Sep 15, 2025

Copy link
Copy Markdown
Member

You're doing good here. Hacking on this, would mean

The path when clicking above, in that: git clone https://github.com/SublimeLinter/SublimeLinter-phpcs.git so that you have Packages/SublimeLinter-phpcs. This will take precedence over the official one installed via Package Control. Then open that folder in Sublime, open linter.py and delete the Line 19 (filename=file_path,) or set it to filename="-",. Save, should reload immediately. See if the patch works. Just delete "Packages/SublimeLinter-phpcs" to undo. If in doubt restart Sublime in between.

Copy link
Copy Markdown
Contributor Author

Yes, that makes it work as expected.

kaste changed the title proposed fix for #1988 / #61 Ignore the filename phpcs reports Sep 16, 2025
kaste merged commit b38bd0d into SublimeLinter:master Sep 16, 2025

kaste commented Sep 16, 2025

Copy link
Copy Markdown
Member

Thanks, you know I can guide you but don't have all the tools and languages installed. ❤️

Copy link
Copy Markdown
Contributor Author

Excellent!

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants


Back | FazBrowse Home | New Git URL