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

Only show swiftpm errors for current file. #135

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

merisbahti
Copy link

The ale linter shows errors for files that aren't open, this can be confusing - especially when the linter shows an error that really doesn't exist in the current open files buffer.

@keith
Copy link
Owner

keith commented Oct 2, 2018

Hmm. I think this behavior is desired since we're not really linting. If you change a protocol in the only file you have open and break all consumers, that seems like useful info. Let me check what other Ale linters like this do.

@merisbahti
Copy link
Author

You're right, it is practical, however the problem is when the output is confusing, see this picture for info:
https://imgur.com/a/RWkLSo4

It's saying that in the current file Eval.swift, there's this error:
cannot convert value of type 'Int' to expected argument type 'String' which isn't right at all.

Usually I only use the linter to see the problems in the current file, and do a swift build to see the holistic perspective. swiftlint works the same way.

@keith
Copy link
Owner

keith commented Oct 4, 2018

Ah interesting, it seems like the incorrect file name in the list is the issue we should fix, instead of filtering the errors all together. Do you know why that is happening?

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

Successfully merging this pull request may close these issues.

None yet

2 participants