-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Unable to parse '.ruff.toml' when configured for Ruff linter #7899
Comments
Hmm, I'm unable to reproduce this on Ruff v0.0.291 or v0.0.292. With:
I created [format]
indent-style = "tab"
quote-style = "single" Running
|
Let me verify that the config is being picked up in my repro. |
Hmm, yes, confirmed, so still unable to repro. Could megalinter be using an older version? |
If the whole parsing of the format section in a ruff.toml file instead of a pyproject.toml file isn't broken, I suspect something with a BOM header might be going on here. Does your tests cover a similar case? |
The affected version was 0.290 (from that user). |
The latest release of Megalinter still has 0.290, but 0.291 is already in main. 0.292 is still in oxsecurity/megalinter#2988 |
I saw the second, #7514, but thought that an existing cli option was renamed, but didn't realise by the release notes that it didn't exist yet, as I thought it was a rename of an old command, and output-format wasn't at a section level. So I'll go and mention that. I really didn't catch that it was a new feature from the release notes, I caught that |
I have often spent significant time determining which rules are available at which version. Sometimes I have found the answer in the release notes, and sometimes have resorted to binary search. |
So... we took the I'd like to have documentation include versions in which things are added. We'd need to build out tooling for it though. |
Sphinx offers |
Unfortunately I don't think those really address our use-cases. We'd probably need to build the tooling into our Rust documentation generator, but we should talk about this in a new discussion instead of cluttering this issue. |
Describe the bug
A clear and concise description of what the bug is.
I configured '.ruff.toml' with additional parameters for Ruff linter, and when running locally or GHA I encounter parsing error:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Script expected to be tab indented and quote style be single quote.
Screenshots
N/A
Additional context
When running Ruff as-is it works well with:
Megalinter's ruff ver :
My local Stand-alone Ruff ver: ruff 0.0.291
Python flavor: oxsecurity/megalinter/flavors/[email protected]
Originally posted by @fawazsalah in oxsecurity/megalinter#2995
And with a comment that has the same bug directly with ruff:
Originally posted by @fawazsalah in oxsecurity/megalinter#2995 (comment)
The text was updated successfully, but these errors were encountered: