12 Commits

Author SHA1 Message Date
Francis Lavoie
792f1c7ed7
caddyhttp: Escaping placeholders in CEL, add vars and vars_regexp (#6594)
Some checks failed
Tests / test (./cmd/caddy/caddy.exe, ~1.22.3, windows-latest, True, 1.22, windows) (push) Waiting to run
Tests / test (./cmd/caddy/caddy.exe, ~1.23.0, windows-latest, True, 1.23, windows) (push) Waiting to run
Lint / lint (macos-14, mac) (push) Waiting to run
Lint / lint (windows-latest, windows) (push) Waiting to run
Tests / test (./cmd/caddy/caddy, ~1.22.3, ubuntu-latest, 0, 1.22, linux) (push) Failing after 1m31s
Tests / test (./cmd/caddy/caddy, ~1.23.0, ubuntu-latest, 0, 1.23, linux) (push) Failing after 1m20s
Tests / test (s390x on IBM Z) (push) Has been skipped
Tests / goreleaser-check (push) Successful in 22s
Cross-Build / build (~1.22.3, 1.22, aix) (push) Successful in 1m32s
Cross-Build / build (~1.22.3, 1.22, darwin) (push) Successful in 1m33s
Cross-Build / build (~1.22.3, 1.22, dragonfly) (push) Successful in 1m29s
Cross-Build / build (~1.22.3, 1.22, freebsd) (push) Successful in 1m32s
Cross-Build / build (~1.22.3, 1.22, illumos) (push) Successful in 1m31s
Cross-Build / build (~1.22.3, 1.22, linux) (push) Successful in 1m30s
Cross-Build / build (~1.22.3, 1.22, netbsd) (push) Successful in 1m31s
Cross-Build / build (~1.22.3, 1.22, openbsd) (push) Successful in 1m28s
Cross-Build / build (~1.22.3, 1.22, solaris) (push) Successful in 1m30s
Cross-Build / build (~1.22.3, 1.22, windows) (push) Successful in 1m30s
Cross-Build / build (~1.23.0, 1.23, aix) (push) Successful in 1m20s
Cross-Build / build (~1.23.0, 1.23, darwin) (push) Successful in 1m21s
Cross-Build / build (~1.23.0, 1.23, dragonfly) (push) Successful in 1m21s
Cross-Build / build (~1.23.0, 1.23, freebsd) (push) Successful in 1m21s
Cross-Build / build (~1.23.0, 1.23, illumos) (push) Successful in 1m20s
Cross-Build / build (~1.23.0, 1.23, linux) (push) Successful in 1m20s
Cross-Build / build (~1.23.0, 1.23, netbsd) (push) Successful in 1m21s
Cross-Build / build (~1.23.0, 1.23, openbsd) (push) Successful in 1m21s
Cross-Build / build (~1.23.0, 1.23, solaris) (push) Successful in 1m20s
Cross-Build / build (~1.23.0, 1.23, windows) (push) Successful in 1m20s
Lint / lint (ubuntu-latest, linux) (push) Successful in 1m59s
Lint / govulncheck (push) Successful in 1m19s
* caddyhttp: Escaping placeholders in CEL

* Simplify some of the test cases

* Implement vars and vars_regexp in CEL

* dupl lint is dumb

* Better consts for the placeholder CEL shortcut

* Bump CEL version, register a few extensions

* Refactor s390x test script for readability

* Add retries for s390x to smooth over flakiness

* Switch to `ph` for the CEL shortcut (match it in templates cause why not)
2024-10-02 06:34:04 -06:00
Mohammed Al Sahaf
6ab9fb6f74
ci: update the linter action version (#6575)
Some checks failed
Tests / test (s390x on IBM Z) (push) Has been skipped
Tests / goreleaser-check (push) Successful in 32s
Cross-Build / build (~1.22.3, 1.22, aix) (push) Successful in 2m52s
Cross-Build / build (~1.22.3, 1.22, dragonfly) (push) Successful in 2m52s
Cross-Build / build (~1.22.3, 1.22, illumos) (push) Successful in 2m54s
Cross-Build / build (~1.22.3, 1.22, linux) (push) Successful in 2m50s
Cross-Build / build (~1.22.3, 1.22, netbsd) (push) Successful in 2m51s
Cross-Build / build (~1.22.3, 1.22, darwin) (push) Failing after 13m24s
Cross-Build / build (~1.22.3, 1.22, freebsd) (push) Failing after 10m16s
Cross-Build / build (~1.22.3, 1.22, openbsd) (push) Successful in 2m50s
Cross-Build / build (~1.22.3, 1.22, solaris) (push) Successful in 2m54s
Cross-Build / build (~1.22.3, 1.22, windows) (push) Successful in 3m5s
Cross-Build / build (~1.23.0, 1.23, aix) (push) Successful in 2m42s
Cross-Build / build (~1.23.0, 1.23, dragonfly) (push) Successful in 2m39s
Cross-Build / build (~1.23.0, 1.23, freebsd) (push) Successful in 2m40s
Cross-Build / build (~1.23.0, 1.23, illumos) (push) Successful in 2m49s
Cross-Build / build (~1.23.0, 1.23, linux) (push) Successful in 2m45s
Cross-Build / build (~1.23.0, 1.23, darwin) (push) Failing after 13m28s
Cross-Build / build (~1.23.0, 1.23, netbsd) (push) Successful in 2m39s
Cross-Build / build (~1.23.0, 1.23, openbsd) (push) Successful in 2m46s
Cross-Build / build (~1.23.0, 1.23, solaris) (push) Successful in 2m39s
Cross-Build / build (~1.23.0, 1.23, windows) (push) Successful in 2m49s
Lint / govulncheck (push) Successful in 2m17s
Lint / lint (ubuntu-latest, linux) (push) Failing after 10m22s
Tests / test (./cmd/caddy/caddy, ~1.22.3, macos-14, 0, 1.22, mac) (push) Has been cancelled
Tests / test (./cmd/caddy/caddy, ~1.23.0, macos-14, 0, 1.23, mac) (push) Has been cancelled
Tests / test (./cmd/caddy/caddy.exe, ~1.22.3, windows-latest, True, 1.22, windows) (push) Has been cancelled
Tests / test (./cmd/caddy/caddy.exe, ~1.23.0, windows-latest, True, 1.23, windows) (push) Has been cancelled
Lint / lint (macos-14, mac) (push) Has been cancelled
Lint / lint (windows-latest, windows) (push) Has been cancelled
* ci: update the linter action version

Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>

* exclude rule `G115`; disable deprecated linter

Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>

---------

Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>
2024-09-16 07:50:26 -06:00
Mohammed Al Sahaf
9cc26ee7bf
chore: update golangci config (#6479)
Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>
2024-07-27 17:20:09 -06:00
Yolan Romailler
2fe69a828f
chore: enabling a few more linters (#5961)
Co-authored-by: Francis Lavoie <lavofr@gmail.com>
2024-01-25 15:24:58 +00:00
Jacob Gadikian
d6f86cccf5
ci: use gci linter (#5708)
* use gofmput to format code

* use gci to format imports

* reconfigure gci

* linter autofixes

* rearrange imports a little

* export GOOS=windows golangci-lint run ./... --fix
2023-08-14 09:41:15 -06:00
Jacob Gadikian
b32f265eca
ci: Use gofumpt to format code (#5707) 2023-08-07 19:40:31 +00:00
Mohammed Al Sahaf
bef1a739db
chore: remove deprecated linters (#5525) 2023-05-08 13:47:33 -06:00
Francis Lavoie
ee7c92ec9b
reverseproxy: Mask the WS close message when we're the client (#5199)
* reverseproxy: Mask the WS close message when we're the client

* weakrand

* Bump golangci-lint version so path ignores work on Windows

* gofmt

* ugh, gofmt everything, I guess
2022-11-14 09:38:02 -07:00
KallyDev
c48fadc4a7
Move from deprecated ioutil to os and io packages (#4364) 2021-09-29 11:17:48 -06:00
Dave Henderson
bd17eb205d
ci: Use golangci's github action for linting (#3794)
* ci: Use golangci's github action for linting

Signed-off-by: Dave Henderson <dhenderson@gmail.com>

* Fix most of the staticcheck lint errors

Signed-off-by: Dave Henderson <dhenderson@gmail.com>

* Fix the prealloc lint errors

Signed-off-by: Dave Henderson <dhenderson@gmail.com>

* Fix the misspell lint errors

Signed-off-by: Dave Henderson <dhenderson@gmail.com>

* Fix the varcheck lint errors

Signed-off-by: Dave Henderson <dhenderson@gmail.com>

* Fix the errcheck lint errors

Signed-off-by: Dave Henderson <dhenderson@gmail.com>

* Fix the bodyclose lint errors

Signed-off-by: Dave Henderson <dhenderson@gmail.com>

* Fix the deadcode lint errors

Signed-off-by: Dave Henderson <dhenderson@gmail.com>

* Fix the unused lint errors

Signed-off-by: Dave Henderson <dhenderson@gmail.com>

* Fix the gosec lint errors

Signed-off-by: Dave Henderson <dhenderson@gmail.com>

* Fix the gosimple lint errors

Signed-off-by: Dave Henderson <dhenderson@gmail.com>

* Fix the ineffassign lint errors

Signed-off-by: Dave Henderson <dhenderson@gmail.com>

* Fix the staticcheck lint errors

Signed-off-by: Dave Henderson <dhenderson@gmail.com>

* Revert the misspell change, use a neutral English

Signed-off-by: Dave Henderson <dhenderson@gmail.com>

* Remove broken golangci-lint CI job

Signed-off-by: Dave Henderson <dhenderson@gmail.com>

* Re-add errantly-removed weakrand initialization

Signed-off-by: Dave Henderson <dhenderson@gmail.com>

* don't break the loop and return

* Removing extra handling for null rootKey

* unignore RegisterModule/RegisterAdapter

Co-authored-by: Mohammed Al Sahaf <msaa1990@gmail.com>

* single-line log message

Co-authored-by: Matt Holt <mholt@users.noreply.github.com>

* Fix lint after a1808b0dbf209c615e438a496d257ce5e3acdce2 was merged

Signed-off-by: Dave Henderson <dhenderson@gmail.com>

* Revert ticker change, ignore it instead

Signed-off-by: Dave Henderson <dhenderson@gmail.com>

* Ignore some of the write errors

Signed-off-by: Dave Henderson <dhenderson@gmail.com>

* Remove blank line

Signed-off-by: Dave Henderson <dhenderson@gmail.com>

* Use lifetime

Signed-off-by: Dave Henderson <dhenderson@gmail.com>

* close immediately

Co-authored-by: Matt Holt <mholt@users.noreply.github.com>

* Preallocate configVals

Signed-off-by: Dave Henderson <dhenderson@gmail.com>

* Update modules/caddytls/distributedstek/distributedstek.go

Co-authored-by: Mohammed Al Sahaf <msaa1990@gmail.com>
Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2020-11-22 14:50:29 -07:00
Mohammed Al Sahaf
7dfd69cdc5
chore: make the linter happier (#3245)
* chore: make the linter happier

* chore: remove reference to maligned linter in .golangci.yml
2020-04-08 15:31:51 -06:00
Mohammed Al Sahaf
e3726588b4 v2: Project-and-CI-wide linter config (#2812)
* v2: split golangci-lint configuration into its own file to allow code editors to take advantage of it

* v2: simplify code

* v2: set the correct lint output formatting

* v2: invert the logic of linter's configuration of output formatting to allow the editor  convenience over CI-specific customization. Customize the output format in CI by passing the flag.

* v2: remove irrelevant golangci-lint config
2019-10-15 15:37:46 -06:00