mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-16 11:23:11 -06:00
Move files back if linting fails
This commit is contained in:
parent
e959927d0a
commit
b840c900ff
|
|
@ -30,7 +30,9 @@ cp go.mod go.mod.bak && cp go.sum go.sum.bak
|
||||||
go get github.com/golangci/golangci-lint/cmd/golangci-lint
|
go get github.com/golangci/golangci-lint/cmd/golangci-lint
|
||||||
|
|
||||||
echo "Looking for lint..."
|
echo "Looking for lint..."
|
||||||
golangci-lint run $args
|
# Run linting
|
||||||
|
# Ensure module files or moved back even if the linting command fails
|
||||||
|
golangci-lint run $args || echo "Linting execution failed..."
|
||||||
|
|
||||||
# Restore go.{mod,sum}
|
# Restore go.{mod,sum}
|
||||||
mv go.mod.bak go.mod && mv go.sum.bak go.sum
|
mv go.mod.bak go.mod && mv go.sum.bak go.sum
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue