mirror of
https://github.com/vale981/apheleia
synced 2025-03-04 17:11:40 -05:00
Add astyle formatter (#169)
This commit is contained in:
parent
bc6b72c05d
commit
0290ae18cc
5 changed files with 12 additions and 1 deletions
|
@ -21,8 +21,10 @@ The format is based on [Keep a Changelog].
|
|||
* [`gawk`](https://www.gnu.org/software/gawk/) for
|
||||
[awk](https://en.wikipedia.org/wiki/AWK) ([#187]).
|
||||
* [`asmfmt`](https://github.com/klauspost/asmfmt) for assembly ([#168]).
|
||||
* [`astyle`](https://github.com/steinwurf/astyle) for C ([#169]).
|
||||
|
||||
[#168]: https://github.com/radian-software/apheleia/pull/168
|
||||
[#169]: https://github.com/radian-software/apheleia/pull/169
|
||||
[#174]: https://github.com/radian-software/apheleia/pull/174
|
||||
[#182]: https://github.com/radian-software/apheleia/pull/182
|
||||
[#187]: https://github.com/radian-software/apheleia/pull/187
|
||||
|
|
|
@ -32,7 +32,9 @@
|
|||
:link '(emacs-commentary-link :tag "Commentary" "apheleia"))
|
||||
|
||||
(defcustom apheleia-formatters
|
||||
'((asmfmt . ("asmfmt"))
|
||||
'((astyle . ("astyle" (apheleia-formatters-locate-file
|
||||
"--options" ".astylerc")))
|
||||
(asmfmt . ("asmfmt"))
|
||||
(bean-format . ("bean-format"))
|
||||
(black . ("black"
|
||||
(when (apheleia-formatters-extension-p "pyi") "--pyi")
|
||||
|
|
1
test/formatters/installers/astyle.bash
Normal file
1
test/formatters/installers/astyle.bash
Normal file
|
@ -0,0 +1 @@
|
|||
apt-get install -y astyle
|
1
test/formatters/samplecode/astyle/in.c
Symbolic link
1
test/formatters/samplecode/astyle/in.c
Symbolic link
|
@ -0,0 +1 @@
|
|||
../clang-format/in.c
|
5
test/formatters/samplecode/astyle/out.c
Normal file
5
test/formatters/samplecode/astyle/out.c
Normal file
|
@ -0,0 +1,5 @@
|
|||
// https://www.ioccc.org/2020/burton/prog.c
|
||||
int main(int b,char**i) {
|
||||
long long n=B,a=I^n,r=(a/b&a)>>4,y=atoi(*++i),_=(((a^n/b)*(y>>T)|y>>S)&r)|(a^r);
|
||||
printf("%.8s\n",(char*)&_);
|
||||
}
|
Loading…
Add table
Reference in a new issue