This repository was archived by the owner on Sep 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Fix #6441. #6442
Merged
Merged
Fix #6441. #6442
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@busykai @ingorichter I had a concern that this silently hides bugs in extensions. I'd prefer it if we don't accept NaN and -1 as line numbers. Can we file a bug on whatever extension has this problem, and then remove this code once that extension is fixed?
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.
@peterflynn it's understandable, so what do you think the strategy should be for linters to report their internal issues? just log it to console? see this issue for example: cfjedimaster/brackets-jshint#24 with this change, the way the output looks likes is the following:

which is much nicer than seeing "nothing to lint".
Now, I understand your point of view. I do think, however, that having the checks for valid input in the code does not actually contradict to the requirement to the extension to report things better. For example, this message "bad option" could have been reported as meta instead of error (on the other hand, having only meta would not cause problem panel to pop up).
So with this background what your suggestion would be for a long-term proper solution? Note that I also filed #6460 to as an idea to address this.