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

Did version 0.0.36 prioritize executing lint security fixes? #491

Open
gbaian10 opened this issue Sep 4, 2024 · 3 comments
Open

Did version 0.0.36 prioritize executing lint security fixes? #491

gbaian10 opened this issue Sep 4, 2024 · 3 comments

Comments

@gbaian10
Copy link

gbaian10 commented Sep 4, 2024

Describe the bug
When I try to add a comma to force a line break in a function, the comma seems to be removed, causing the line break to fail.

Expected behavior
image

If format is prioritized, COM819 should not occur.

Environments (please complete the following information):

  • IDE: [PyCharm Professional 2024.2.1 ]
  • OS: [Ubuntu 22.04 ]
  • Ruff Version [0.6.3 ]
  • Plugin version [0.0.36 ]
@dhruvmanila
Copy link

It's not recommended to include COM819 if you're using both the Ruff linter and formatter as they'll conflict with each other. Refer https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules for more information. I don't think this is a bug in the extension.

@gbaian10
Copy link
Author

gbaian10 commented Sep 4, 2024

It's not recommended to include COM819 if you're using both the Ruff linter and formatter as they'll conflict with each other. Refer https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules for more information. I don't think this is a bug in the extension.

Because this issue didn't seem to occur in the past, and using the official plugin in VSCode also produces the expected results.
I wonder if it's really because version 0.0.36 runs the linter before the formatter that causes this problem?

@dhruvmanila
Copy link

I wonder if it's really because version 0.0.36 runs the linter before the formatter that causes this problem?

I wouldn't recommend to rely on the order of running the linter / formatter. At least in the VS Code extension it's not in our control as it's the client (VS Code) that sends the request to the server to update the diagnostics or format the open file.

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

No branches or pull requests

2 participants