b3e692ed09
caddyfile: Fix formatting for backquote wrapped braces ( #6903 )
Tests / test (./cmd/caddy/caddy, ~1.24.1, macos-14, 0, 1.24, mac) (push) Waiting to run
Tests / test (./cmd/caddy/caddy, ~1.24.1, ubuntu-latest, 0, 1.24, linux) (push) Waiting to run
Tests / test (./cmd/caddy/caddy.exe, ~1.24.1, windows-latest, True, 1.24, windows) (push) Waiting to run
Tests / test (s390x on IBM Z) (push) Waiting to run
Tests / goreleaser-check (push) Waiting to run
Cross-Build / build (~1.24.1, 1.24, aix) (push) Waiting to run
Cross-Build / build (~1.24.1, 1.24, darwin) (push) Waiting to run
Cross-Build / build (~1.24.1, 1.24, dragonfly) (push) Waiting to run
Cross-Build / build (~1.24.1, 1.24, freebsd) (push) Waiting to run
Cross-Build / build (~1.24.1, 1.24, illumos) (push) Waiting to run
Cross-Build / build (~1.24.1, 1.24, linux) (push) Waiting to run
Cross-Build / build (~1.24.1, 1.24, netbsd) (push) Waiting to run
Cross-Build / build (~1.24.1, 1.24, openbsd) (push) Waiting to run
Cross-Build / build (~1.24.1, 1.24, solaris) (push) Waiting to run
Cross-Build / build (~1.24.1, 1.24, windows) (push) Waiting to run
Lint / lint (macos-14, mac) (push) Waiting to run
Lint / lint (ubuntu-latest, linux) (push) Waiting to run
Lint / lint (windows-latest, windows) (push) Waiting to run
Lint / govulncheck (push) Waiting to run
2025-03-17 08:58:46 -06:00
1c4a807667
chore: Upgrade some dependencies ( #6221 )
2024-04-04 18:27:52 -04:00
8bbf8ec629
caddyfile: Assert having a space after heredoc marker to simply check ( #6117 )
2024-02-20 12:29:20 +00:00
21744b6c4c
Revert "caddyfile: Reject long heredoc markers ( #6098 )" ( #6100 )
...
This reverts commit e7a534d0a311d9fa75b5981879c755281c4c9fba.
2024-02-12 18:06:22 +00:00
e7a534d0a3
caddyfile: Reject long heredoc markers ( #6098 )
...
Co-authored-by: Mohammed Al Sahaf <msaa1990@gmail.com >
2024-02-11 13:30:14 -05:00
7c48b5fdbb
caddyfile: Switch to slices.Equal for better performance ( #6061 )
2024-01-25 14:46:08 +00:00
c0273f1f04
caddyfile: Add heredoc support to fmt
command ( #6056 )
2024-01-22 02:24:49 +00:00
49b7a25264
Fix #4169 (correct e6c58fd)
2022-09-15 14:13:58 -06:00
e6c58fdc08
caddyfile: Prevent infinite nesting on fmt ( fix #4175 )
2022-09-15 14:12:53 -06:00
bc22102478
caddyfile: Fix caddy fmt
nesting not decrementing ( #4157 )
...
* caddyfile(formatter): fix nesting not decrementing
This is an extremely weird edge-case where if you had a environment variable {}
on one line, a comment on the next line, and the closing of the block on the
following line; the rest of the Caddyfile would be indented further than it
should've been.
ref; https://github.com/matthewpi/vscode-caddyfile-support/issues/13
* run gofmt
* fmt: better way of handling edge case
2021-05-10 12:01:27 -06:00
635f075f18
caddyfile: Fix minor bug in formatter
2020-12-16 15:22:16 -07:00
96d6d277a4
caddyconfig: Don't start comments in middle of tokens ( #3267 )
...
* caddyconfig: Only parse # as start of comment if preceded by space
* caddyconfig: Simplify # logic using len(val), add a test
2020-05-05 12:32:12 -06:00
deba26d225
caddyfile: Minor fixes to the formatter
2020-03-29 13:53:00 -06:00
7ee3ab7baa
caddyfile: Formatter enhancements
2020-03-25 18:45:54 -06:00
f192ae5ea5
cmd: fmt: Fix brace opening block indentation ( #3153 )
...
This fixes indentation for blocks starting with
a brace as:
```Caddyfile
{
...
}
```
Fixes #3144
Signed-off-by: Vaibhav <vrongmeal@gmail.com >
2020-03-17 09:55:36 -06:00
71e81d262b
fmt: Add support for block nesting. ( #3105 )
...
Previously the formatter did not include support for
blocks inside other blocks. Hence the formatter could
not indent some files properly. This fixes it.
Fixes #3104
Signed-off-by: Vaibhav <vrongmeal@gmail.com >
2020-02-29 13:23:08 -07:00
5fe69ac4ab
cmd: Add caddy fmt
command. ( #3090 )
...
This takes the config file as input and formats it.
Prints the result to stdout. Can write changes to
file if `--write` flag is passed.
Fixes #3020
Signed-off-by: Vaibhav <vrongmeal@gmail.com >
2020-02-29 10:12:16 -07:00