Skip to content

Commit

Permalink
feat: ruff (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
isaksamsten authored Sep 14, 2023
1 parent 808c7e0 commit fdc4a0f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ To view configured and available formatters, as well as to see the path to the l
- [prettierd](https://github.com/fsouza/prettierd) - prettier, as a daemon, for ludicrous formatting speed.
- [rubocop](https://github.com/rubocop/rubocop) - Ruby static code analyzer and formatter, based on the community Ruby style guide.
- [rustfmt](https://github.com/rust-lang/rustfmt) - A tool for formatting rust code according to style guidelines.
- [ruff](https://github.com/astral-sh/ruff) - An extremely fast Python linter, written in Rust.
- [scalafmt](https://github.com/scalameta/scalafmt) - Code formatter for Scala.
- [shellharden](https://github.com/anordal/shellharden) - The corrective bash syntax highlighter
- [shfmt](https://github.com/mvdan/sh) - A shell parser, formatter, and interpreter with `bash` support.
Expand Down
19 changes: 19 additions & 0 deletions lua/conform/formatters/ruff.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
return {
meta = {
url = "https://beta.ruff.rs/docs/",
description = "An extremely fast Python linter, written in Rust.",
},
command = "ruff",
args = {
"--fix",
"-e",
"-n",
"--stdin-filename",
"$FILENAME",
"-",
},
stdin = true,
cwd = require("conform.util").root_file({
"pyproject.toml",
}),
}

0 comments on commit fdc4a0f

Please sign in to comment.