Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Run golint and go vet as external inspections (fixes #342) #1554

wants to merge 1 commit into from

Conversation

dlsniper
Copy link
Member

No description provided.

@dlsniper dlsniper added this to the 1.0.0 milestone Apr 11, 2015
@dlsniper
Copy link
Member Author

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 *Inspection class is created and then the *ExternalAnnotator just implements the abstraction and functions like getting the ProcessOutput as well as the other cosmetics functions.

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>

Copy link
Contributor

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).

Copy link
Member Author

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?

@ignatov ignatov assigned zolotov and unassigned ignatov Apr 11, 2015
@dlsniper dlsniper changed the title Run golint as external inspection (fixes #342) Run golint and go vet as external inspections (fixes #342) Apr 12, 2015
@dlsniper
Copy link
Member Author

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"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is that?

Copy link
Member Author

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.

@dlsniper
Copy link
Member Author

dlsniper commented May 3, 2015

I've rebased and squashed this. Please let me know if there's anything else I should do to have this merged. Thank you!

@dlsniper
Copy link
Member Author

dlsniper commented Jun 2, 2015

Ping for this one :-)

@zolotov
Copy link
Contributor

zolotov commented Jun 2, 2015

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.

@zolotov zolotov modified the milestones: 1.0 maybe?, 1.0.0 Jun 2, 2015
@dlsniper
Copy link
Member Author

dlsniper commented Jun 2, 2015

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?

@zolotov
Copy link
Contributor

zolotov commented Jun 2, 2015

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.

@dlsniper
Copy link
Member Author

dlsniper commented Jun 2, 2015

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?

@zolotov
Copy link
Contributor

zolotov commented Jun 3, 2015

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.

Yes, it's the preferable way. Besides quickfixes we can allow user to disable/suppress some of them as well.

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).

It's ok, java has much more inspections, they are run concurrently and it shouldn't be a problem.

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?

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.

@dlsniper dlsniper mentioned this pull request Jun 5, 2015
@dlsniper dlsniper closed this Aug 16, 2015
@dlsniper dlsniper deleted the golint-external branch September 21, 2015 20:42
@dlsniper dlsniper modified the milestones: 1.0 maybe?, 1.0.0 Nov 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants