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

Raise syntax-error correctly on invalid encodings #7553

Merged
merged 2 commits into from Oct 2, 2022

Conversation

DanielNoord
Copy link
Collaborator

  • Write a good description on what the PR does.
  • Create a news fragment with towncrier create <IssueNumber>.<type> which will be
    included in the changelog. <type> can be one of: new_check, removed_check, extension,
    false_positive, false_negative, bugfix, other, internal. If necessary you can write
    details or offer examples on how the new change is supposed to work.
  • If you used multiple emails or multiple names when contributing, add your mails
    and preferred name in script/.contributors_aliases.json

Type of Changes

Type
🐛 Bug fix

Description

Closes #7522.

@DanielNoord DanielNoord added Bug 🪲 Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer labels Oct 2, 2022
@DanielNoord DanielNoord added this to the 2.15.4 milestone Oct 2, 2022
@@ -0,0 +1 @@
syntax-error:1:0:None:None::"Parsing failed: 'unknown encoding for '/Users/daniel/DocumentenLaptop/Programming/Github/pylint/tests/functional/s/syntax/syntax_error_invalid_encoding.py': lala'":HIGH
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
syntax-error:1:0:None:None::"Parsing failed: 'unknown encoding for '/Users/daniel/DocumentenLaptop/Programming/Github/pylint/tests/functional/s/syntax/syntax_error_invalid_encoding.py': lala'":HIGH
syntax-error:1:0:None:None::"Parsing failed: 'unknown encoding for '/Users/daniel/DocumentenLaptop/Programming/Github/pylint/tests/functional/s/syntax/syntax_error_invalid_encoding.py': lala'":HIGH

This can't work, we probably need a unit test for this or to change to a relative path.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah. I'll make a unittest

@coveralls
Copy link

Pull Request Test Coverage Report for Build 3169880186

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.0008%) to 95.335%

Totals Coverage Status
Change from base Build 3167791130: 0.0008%
Covered Lines: 17124
Relevant Lines: 17962

💛 - Coveralls

Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@DanielNoord DanielNoord merged commit 9063aff into pylint-dev:main Oct 2, 2022
@DanielNoord DanielNoord deleted the syntax branch October 2, 2022 20:23
@Pierre-Sassoulas Pierre-Sassoulas added Backported and removed Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer labels Oct 10, 2022
Pierre-Sassoulas pushed a commit to Pierre-Sassoulas/pylint that referenced this pull request Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

syntax-error cannot be emitted, raises InvalidMessageError instead
3 participants