Skip to content

Commit 917bc56

Browse files
Fredrik Foss-IndrehusFredrik Foss-Indrehus
andauthored
fix: rename awk formatter to gawk (#589)
* rename awk to gawk * reintroduce awk formatter for backward compatibility * use original command, awk, in awk.lua instead of gawk --------- Co-authored-by: Fredrik Foss-Indrehus <[email protected]>
1 parent d2fdcc3 commit 917bc56

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ You can view this list in vim with `:help conform-formatters`
188188
- [autocorrect](https://github.com/huacnlee/autocorrect) - A linter and formatter to help you to improve copywriting, correct spaces, words, and punctuations between CJK.
189189
- [autoflake](https://github.com/PyCQA/autoflake) - Removes unused imports and unused variables as reported by pyflakes.
190190
- [autopep8](https://github.com/hhatto/autopep8) - A tool that automatically formats Python code to conform to the PEP 8 style guide.
191-
- [awk](https://www.gnu.org/software/gawk/manual/gawk.html) - Format awk programs with awk
191+
- [gawk](https://www.gnu.org/software/gawk/manual/gawk.html) - Format awk programs with gawk.
192192
- [bean-format](https://beancount.github.io/docs/running_beancount_and_generating_reports.html#bean-format) - Reformat Beancount files to right-align all the numbers at the same, minimal column.
193193
- [beautysh](https://github.com/lovesegfault/beautysh) - A Bash beautifier for the masses.
194194
- [bibtex-tidy](https://github.com/FlamingTempura/bibtex-tidy) - Cleaner and Formatter for BibTeX files.

doc/conform.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ FORMATTERS *conform-formatter
263263
pyflakes.
264264
`autopep8` - A tool that automatically formats Python code to conform to the PEP
265265
8 style guide.
266-
`awk` - Format awk programs with awk
266+
`gawk` - Format awk programs with gawk.
267267
`bean-format` - Reformat Beancount files to right-align all the numbers at the
268268
same, minimal column.
269269
`beautysh` - A Bash beautifier for the masses.

lua/conform/formatters/awk.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
return {
33
meta = {
44
url = "https://www.gnu.org/software/gawk/manual/gawk.html",
5-
description = "Format awk programs with awk",
5+
description = "Format awk programs with gawk.",
6+
deprecated = true,
67
},
78
command = "awk",
89
args = { "-f", "-", "-o-" },

lua/conform/formatters/gawk.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---@type conform.FileFormatterConfig
2+
return {
3+
meta = {
4+
url = "https://www.gnu.org/software/gawk/manual/gawk.html",
5+
description = "Format awk programs with gawk.",
6+
},
7+
command = "gawk",
8+
args = { "-f", "-", "-o-" },
9+
}

0 commit comments

Comments
 (0)