phpinsights
phpinsights copied to clipboard
Implement option to output issues grouped by file
| Q | A |
|---|---|
| Bug report? | no |
| Feature request? | yes |
| Library version | 1.7.0 |
Right now all found issues are grouped by type of issue and sniffer name. That's good, but if I wanted to fix all found issues in one file then I would have to search for file path in output. In big projects this may be a problem.
That's why I think there should be an option to output issues grouped by file path.
Great idea! Before we implement this, a workaround for you could be to use the new feature to specify a file when running this package.
This way you get faster insights as it is only scanning one file and you only see issues for that file🤩
Right now as a workaround I pipe output into txt file and then sort lines lexicographically with "String Manipulation" plugin for PHPStorm. Works good enough even for 30k+ lines of output.
@JacekAndrzejewski Sounds really cool!
We actually have a PR #201 which prob. soon will get merged which will help make that part easier also as it removes all data from which is not related to the result when you pipe data. It also adds a json format.
Btw you can add phpinsight as a external tool and trigger it per file to get the result fast and easy in phpstorm

@olivernybroe I don't see the output anywhere. Not sure if this even triggers? Am I missing something?

@MrMadClown It doesn't trigger automatically, you have to run it manually :)
I have actually created a plugin for phpstorm which runs the tool automatically, which you also could use. (working on a update for it to work on newest version of phpstorm consistently)
@olivernybroe Oh right! It's not a File Watcher, for some reason I thought that. Thanks for the plugin, I'll check it immediately.