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

Add support for ruff #18

Merged
merged 1 commit into from
Aug 26, 2024
Merged

Add support for ruff #18

merged 1 commit into from
Aug 26, 2024

Conversation

FrostyX
Copy link
Member

@FrostyX FrostyX commented Aug 24, 2024

@FrostyX FrostyX force-pushed the ruff branch 2 times, most recently from f1926fc to 2384dfa Compare August 24, 2024 15:31
"""
Run `ruff check` and return a dict with its results
"""
cmd = ["ruff", "check", "--output-format=json"] + sys.argv[1:]
Copy link
Member

Choose a reason for hiding this comment

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

Should it be added as a weak deps to spec file?

Should the argv be sanitized?

Copy link
Member Author

Choose a reason for hiding this comment

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

Should it be added as a weak deps to spec file?

It should, thank you. Good catch.

Should the argv be sanitized?

I don't know, I did the same that vcs-diff-lint-csdiff-pylint does. But probably not? Worst case scenario, the bad values are going to be passed to ruff check which will handle it and error out.

Copy link
Member

Choose a reason for hiding this comment

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

Right, with the shell=False (that is the default) this is not a problem.

Copy link
Member

@xsuchy xsuchy left a comment

Choose a reason for hiding this comment

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

+1

@praiskup
Copy link
Member

Thank you!

@praiskup praiskup merged commit c9296b8 into fedora-copr:main Aug 26, 2024
7 checks passed
FrostyX added a commit to FrostyX/vcs-diff-lint-action that referenced this pull request Aug 27, 2024
FrostyX added a commit to FrostyX/vcs-diff-lint-action that referenced this pull request Aug 28, 2024
FrostyX added a commit to fedora-copr/vcs-diff-lint-action that referenced this pull request Aug 28, 2024
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

Successfully merging this pull request may close these issues.

Add support for ruff
3 participants