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 xmllint #251

Merged
merged 2 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,6 @@ The format is based on [Keep a Changelog].

### Formatters

* [`yq`](https://mikefarah.gitbook.io/yq/) for YAML, JSON, CSV, TSV, XML and [.properties](https://en.wikipedia.org/wiki/.properties) ([#250]).
* [purs-tidy](https://github.com/natefaubion/purescript-tidy) for PureScript ([#182]).
* [`jq`](https://stedolan.github.io/jq/) for
[JSON](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/JSON)
([#174]).
* [`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]).
* [`beautysh`](https://github.com/lovesegfault/beautysh) for shell
Expand All @@ -79,19 +72,27 @@ The format is based on [Keep a Changelog].
* [`cmake-format`](https://github.com/cheshirekow/cmake_format)
for [CMake](https://cmake.org/) ([#172]).
* [`fourmolu`](https://github.com/fourmolu/fourmolu) for haskell
* [`gawk`](https://www.gnu.org/software/gawk/) for
[awk](https://en.wikipedia.org/wiki/AWK) ([#187]).
* [`hclfmt`](https://github.com/hashicorp/hcl/tree/main/cmd/hclfmt) for [HCL](https://github.com/hashicorp/hcl) ([#231])
* [`html-tidy`](https://www.html-tidy.org/) for HTML/XML ([#173]).
* [`jq`](https://stedolan.github.io/jq/) for
[JSON](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/JSON)
([#174]).
* [`ormolu`](https://github.com/tweag/ormolu) for haskell.
* [`perltidy`](https://perltidy.sourceforge.net/) for
[perl](https://www.perl.org/) ([#175]).
* [purs-tidy](https://github.com/natefaubion/purescript-tidy) for PureScript ([#182]).
* [`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]).
* [`xmllint`](https://gitlab.gnome.org/GNOME/libxml2) for XML ([#251]).
* [`yapf`](https://github.com/google/yapf) for [Python](https://www.python.org/) ([#196])
* [`hclfmt`](https://github.com/hashicorp/hcl/tree/main/cmd/hclfmt) for [HCL](https://github.com/hashicorp/hcl) ([#231])
* [`yq`](https://mikefarah.gitbook.io/yq/) for YAML, JSON, CSV, TSV, XML and [.properties](https://en.wikipedia.org/wiki/.properties) ([#250]).

[#167]: https://github.com/radian-software/apheleia/pull/167
[#168]: https://github.com/radian-software/apheleia/pull/168
Expand Down
1 change: 1 addition & 0 deletions apheleia-formatters.el
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@
(stylua . ("stylua" "-"))
(rustfmt . ("rustfmt" "--quiet" "--emit" "stdout"))
(terraform . ("terraform" "fmt" "-"))
(xmllint . ("xmllint" "--format" "-"))
(yapf . ("yapf"))
(yq-csv . ("yq" "--prettyPrint" "--no-colors"
"--input-format" "csv" "--output-format" "csv"))
Expand Down
1 change: 1 addition & 0 deletions test/formatters/installers/xmllint.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
apt-get install -y libxml2-utils
1 change: 1 addition & 0 deletions test/formatters/samplecode/xmllint/in.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<hello who='world' />
2 changes: 2 additions & 0 deletions test/formatters/samplecode/xmllint/out.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0"?>
<hello who="world"/>