-
Notifications
You must be signed in to change notification settings - Fork 96
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
support relative paths in linter + spans that span multiple characters/lines #369
Conversation
this.linter && this.linter.setMessages(this.errorMatcher.getMatches().map(match => ({ | ||
type: 'Error', | ||
text: match.message || 'Error from build', | ||
filePath: match.file, | ||
filePath: path.isAbsolute(match.file) ? match.file : path.join(atom.project.getPaths()[0], match.file), |
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.
The error match file/configuration is not necessarily in the first project. The path you're actually looking for here is in the variable p
(determined at the top of this function).
addressed comments by fixing the appropriate commits |
the problem is that you don't get a hit on |
Still something weird with the test: https://travis-ci.org/noseglid/atom-build/jobs/119506163 Also, I think it makes more sense to take it relative to the cwd of the executed command (rather than active project path). |
This will solve #359 |
oh. that makes sense |
And the remaining failing spec probably has the same fix as the one you already corrected. (You can run specs locally in your |
changed to use |
The slashes |
7aecefa
to
3aa1a2d
Compare
travis and appveyor are happy now |
Very nice. Thanks for this! |
previously the lints did not show up in files if the paths were relative. Alternatively this could be changed in atom-linter directly, but I don't think that's feasible as atom-linter doesn't know about projects, but atom-build explicitly does.
fixes #359