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

(question) catching linter errors #128

Closed
mschuchard opened this issue Apr 11, 2016 · 3 comments
Closed

(question) catching linter errors #128

mschuchard opened this issue Apr 11, 2016 · 3 comments
Labels

Comments

@mschuchard
Copy link

When using atom-linter to execute a linter (e.g. eslint, rubocop, flake8) on the file currently being edited, as in the way most of the linters are doing (return helpers.exec(atom.config.get('linterExecutablePath'), args, {stream: 'stdout'}).then(output => {), is there any way to catch errors thrown by the linter?

I skimmed index.js and nothing jumped out at me.

@steelbrain
Copy link
Owner

.catch(function(error) { console.log(error); throw error })
It returns a promise, it's easy to chain promises
Check out Promise on mdn

@steelbrain
Copy link
Owner

Also linterExecutablePath is an invalid config key, it should be package-name.linterExecutablePath

@mschuchard
Copy link
Author

Thanks for the tip. I basically need this so that python IOError is ignored. It does not seem that Javascript is robust enough to handle something that granular, but I will try to figure out if and how to get this working.

Also linterExecutablePath is an invalid config key, it should be package-name.linterExecutablePath

Yeah I was trying to write general 'foo' code and apparently failed.

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

No branches or pull requests

2 participants