Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

linter-ruby does not support Lint on the fly #27

Closed
mneumark opened this issue Aug 11, 2015 · 6 comments
Closed

linter-ruby does not support Lint on the fly #27

mneumark opened this issue Aug 11, 2015 · 6 comments
Labels

Comments

@mneumark
Copy link

I have been holding off on updating for a while due to linter-ruby not being upgraded for linter 1.3. Then there was an update, but it was broken. Finally this morning it's working again, but it only seems to lint when I save the file.

I checked my settings under linter and sure enough Lint on the fly is checked.

I checked in with the linter folks and was informed its a problem with linter-ruby:
steelbrain/linter#824

They said it SAYS linter-ruby supports lintOnFly, but it only passes linter the current file name so it can only be used as lintOnSave as currently written.

@mneumark
Copy link
Author

I suppose it'd have to try/catch running the code from activeEditor.getText() through the linter.

@Arcanemagus
Copy link
Member

If the linter itself supports getting the input from stdin all you need to do is add stdin: text to the options on line 45, and grab the text contents before that with getText() as @mneumark said.

@Arcanemagus
Copy link
Member

If it doesn't support stdin input... then things get tricky as you would need to generate a temporary file to lint on and handle cleaning it up afterwards.

@mneumark
Copy link
Author

Don't you need to make a separate helpers.exec call for the stdin version versus the saved copy version?

@Arcanemagus
Copy link
Member

Actually... that's a good point. @steelbrain does linter just make a call to the linter provider with the current contents on save?

If lintOnFly is working it should have already caught any changes, but I'm not positive. No linter that does lintOnFly has a separate call though.

@mneumark
Copy link
Author

I guess I'll close this since it seems the fix for this was merged (and just not released yet).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants