mirror of
https://github.com/vale981/apheleia
synced 2025-03-04 09:01:42 -05:00
Add support for the ruff python formatter (#236)
This adds support, but does not make it the default Fixes: #233 --------- Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
This commit is contained in:
parent
4178439d43
commit
392028d823
5 changed files with 17 additions and 0 deletions
|
@ -69,6 +69,8 @@ The format is based on [Keep a Changelog].
|
|||
* [`rubocop`](https://github.com/rubocop/rubocop) for [ruby](https://www.ruby-lang.org/en/) ([#176]).
|
||||
* [`ruby-standard`](https://github.com/standardrb/standard) for
|
||||
[ruby](https://www.ruby-lang.org/en/) ([#201])
|
||||
* [`ruff`](https://github.com/astral-sh/ruff) for
|
||||
[python](https://python.org) ([#236])
|
||||
* [`rufo`](https://github.com/ruby-formatter/rufo) for
|
||||
[Ruby](https://www.ruby-lang.org/en/) ([#177]).
|
||||
* [`yapf`](https://github.com/google/yapf) for [Python](https://www.python.org/) ([#196])
|
||||
|
@ -94,6 +96,7 @@ The format is based on [Keep a Changelog].
|
|||
[#215]: https://github.com/radian-software/apheleia/pull/215
|
||||
[#223]: https://github.com/radian-software/apheleia/pull/223
|
||||
[#231]: https://github.com/radian-software/apheleia/pull/231
|
||||
[#236]: https://github.com/radian-software/apheleia/pull/236
|
||||
|
||||
## 3.2 (released 2023-02-25)
|
||||
### Features
|
||||
|
|
|
@ -121,6 +121,11 @@
|
|||
"--stderr" "--format" "quiet" "--fail-level" "fatal"))
|
||||
(ruby-standard . ("standardrb" "--stdin" filepath "--fix" "--stderr"
|
||||
"--format" "quiet" "--fail-level" "fatal"))
|
||||
(ruff . ("ruff" "format"
|
||||
"--silent"
|
||||
(apheleia-formatters-fill-column "--line-length")
|
||||
"--stdin-filename" filepath
|
||||
"-"))
|
||||
(shfmt . ("shfmt"
|
||||
"-filename" filepath
|
||||
"-ln" (cl-case (bound-and-true-p sh-shell)
|
||||
|
|
2
test/formatters/installers/ruff.bash
Normal file
2
test/formatters/installers/ruff.bash
Normal file
|
@ -0,0 +1,2 @@
|
|||
apt-get install -y python3-pip
|
||||
pip install ruff
|
4
test/formatters/samplecode/ruff/in.py
Normal file
4
test/formatters/samplecode/ruff/in.py
Normal file
|
@ -0,0 +1,4 @@
|
|||
def asdjf ( l,
|
||||
a):
|
||||
3
|
||||
+4
|
3
test/formatters/samplecode/ruff/out.py
Normal file
3
test/formatters/samplecode/ruff/out.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
def asdjf(l, a):
|
||||
3
|
||||
+4
|
Loading…
Add table
Reference in a new issue