Removed code snippet in the error message for config file parsing errors #927
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.
Motivation and Context
From #920, it is apparent that pylint does not accurately display the lines containing the error for config file parsing errors. This PR aims to prevent the reporter from displaying the incorrect lines as the source of the error and simply show no code instead.
Your Changes
Description:
NO_SNIPPET
which prevents the reporter from displaying incorrect lines as the sources of error._override_config
to add E0015 to the reporter instead of printing tostderr
.Type of change (select all that apply):
Testing
Questions and Comments (if applicable)
Did not include theF0011
error in the updated tests since it seems to cause all other config file errors to be excluded. I ran the updatedtest_config_parsing_errors
but includedF0011
inCONFIG_ERRORS_TO_CHECK
, but after debugging, it seems to not report theW0012
andR0022
even though those errors are in the config file. Maybe since it's a "fatal" error, it stops pylint from checking for other errors?F0011
andR0022
were the only errors that I was able to reproduce. The other errors whose id started with "00" were probably either command line or inline errors.E0015
was not showing up in the reporter because the message was being printed tostderr
instead inside of_override_config
. I've updated it to now add the message to the reporter.Checklist