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
Run golint and go vet as external inspections (fixes #342) #1554
Conversation
I don't know how to make the description to properly appear in the settings panel (even if I've left the IDE create the html file). Ideally, I'll add the go vet inspections as well after this gets merged but I don't really know where to start and do all the abstraction work so that only the settings file I wonder if the abstraction for it could be extracted to the platform itself at some point? What do you think? Does it make sense? |
@@ -26,7 +26,7 @@ | |||
<p>Alpha pre-release of the 1.0.0 version.</p> | |||
<p>Doesn't contain all the functionality of the 0.9.x branch but has a completely reworked internals. | |||
It's faster than 0.9.x, refactoring works to some degree and has native support for gopath packages.</p> | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to reformat the whole file. As for me, it's better to separate formatting/adding a new functional (just for better git history).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, that's my default setting to remove all trailing spaces from all lines when saving files which seems it's not in this project settings. I'll see if I can change the commit somehow.
Maybe it's a good idea to create PR to cleanup the sources and remove unused imports as well?
I've pushed go vet as well as it will make the review process simpler / faster. go vet is basically a copy paste of golint with small tweaks for the tool to execute and how to parse the line (plus where to get the line itself). |
bundle="do.not.touch.this.attribute" /> | ||
|
||
|
||
<projectService serviceImplementation="com.goide.inspections.external.golint.GoLintSettings"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've forgot to delete it from here.
I've rebased and squashed this. Please let me know if there's anything else I should do to have this merged. Thank you! |
Ping for this one :-) |
Cannot merge it. It just works badly. Mostly it's because it's not supposed by the platform that External Annotator will be invoked on file system. Hope it will be fixed in IDEA 15. |
I see. I was on the phone and Github doesn't display nicely in the web interface. Should I rebase it for merging? Or because of the platform issues it wouldn't get in anyway? |
Yes, I meant platform issue as the reason of merging problems. It just doesn't work, highlighting is wrong most of the time. The only chance to merge it is to disable inspection in the fly mode, but it's not that users want either. |
I see, like I said in another ticket, I think it's better to support all the inspections golint has, even if we duplicate functionality as it means we can provide fixes for them for example. I know I'll go a bit of topic but. What's the performance impact, from your experience with the other languages, when we'll have say 30-40 inspections (I think that's a good number considering all the possible inspections from golint and other tickets as well). Is there something that we could to for example run a single function checker that combines the job of 3-4 inspections so that we avoid walking the tree 3-4 times and we do it just once? Or that part is usually not a problem compared to the inspection weight themselves? |
Yes, it's the preferable way. Besides quickfixes we can allow user to disable/suppress some of them as well.
It's ok, java has much more inspections, they are run concurrently and it shouldn't be a problem.
Yes, there are couple approaches to do less work in the very similar inspections, but for now it's premature optimization. As for walking the tree, platform does it for us, psi tree is not traversed for each inspection separately. |
No description provided.