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

Update golangci/golangci-lint Docker tag to v1.55.0 #358

Merged
merged 3 commits into from
Oct 25, 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
5 changes: 4 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v1.54.2
# v1.55.0
# Please don't remove the first line. It is used in CI to determine the golangci version
run:
deadline: 5m
Expand Down Expand Up @@ -104,4 +104,7 @@ linters:
- ifshort
- nosnakecase
- depguard # Dependency whitelist, needs to be configured
- inamedparam # Fails if interfaces do not have named params. Not in our code style.
- perfsprint # Suggests using strconv.* instead of fmt.* for printing numbers. Not very practical.
- protogetter # Complains when code reads var.Something if var.GetSomething() exists. Not useful.
fast: false
1 change: 1 addition & 0 deletions pkg/iptables/iptables.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import (
const redirectLocalRule = "OUTPUT " + // For local traffic
"-t nat " + // Traversing the nat table
"-s 127.0.0.0/8 -d 127.0.0.1/32 " + // Coming from and directed to localhost, i.e. not the pod IP.
//nolint:goconst
"-p tcp --dport %d " + // Sent to the upstream application's port
"-j REDIRECT --to-port %d" // Forward it to the proxy address

Expand Down
3 changes: 1 addition & 2 deletions pkg/runtime/executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ func Test_Exec(t *testing.T) {

if string(out) != tc.expectOutput {
t.Errorf(
"returned output does not match expected value.\n"+
"Expected: %s\nActual: %s\n",
"returned output does not match expected value.\nExpected: %s\nActual: %s",
tc.expectOutput,
string(out),
)
Expand Down
21 changes: 7 additions & 14 deletions pkg/runtime/fake_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ func Test_FakeExecutor(t *testing.T) {

if !errors.Is(err, tc.err) {
t.Errorf(
"returned error does not match expected value.\n"+
"Expected: %v\nActual: %v\n",
"returned error does not match expected value.\nExpected: %v\nActual: %v",
tc.err,
err,
)
Expand All @@ -64,8 +63,7 @@ func Test_FakeExecutor(t *testing.T) {

if string(out) != string(tc.out) {
t.Errorf(
"returned output does not match expected value.\n"+
"Expected: %s\nActual: %s\n",
"returned output does not match expected value.\nExpected: %s\nActual: %s",
string(tc.out),
string(out),
)
Expand Down Expand Up @@ -107,8 +105,7 @@ func Test_MultipleExecutions(t *testing.T) {

if !errors.Is(err, tc.err) {
t.Errorf(
"returned error does not match expected value.\n"+
"Expected: %v\nActual: %v\n",
"returned error does not match expected value.\nExpected: %v\nActual: %v",
tc.err,
err,
)
Expand All @@ -117,8 +114,7 @@ func Test_MultipleExecutions(t *testing.T) {

if string(out) != string(tc.out) {
t.Errorf(
"returned output does not match expected value.\n"+
"Expected: %s\nActual: %s\n",
"returned output does not match expected value.\nExpected: %s\nActual: %s",
string(tc.out),
string(out),
)
Expand All @@ -130,8 +126,7 @@ func Test_MultipleExecutions(t *testing.T) {
actual := strings.Join(fake.CmdHistory(), "\n")
if actual != expected {
t.Errorf(
"command history does not match expected value.\n"+
"Expected: %v\nActual: %v\n",
"command history does not match expected value.\nExpected: %v\nActual: %v",
expected,
actual,
)
Expand Down Expand Up @@ -190,8 +185,7 @@ func Test_Callbacks(t *testing.T) {

if !errors.Is(err, tc.err) {
t.Errorf(
"returned error does not match expected value.\n"+
"Expected: %v\nActual: %v\n",
"returned error does not match expected value.\nExpected: %v\nActual: %v",
tc.err,
err,
)
Expand All @@ -200,8 +194,7 @@ func Test_Callbacks(t *testing.T) {

if string(out) != string(tc.out) {
t.Errorf(
"returned output does not match expected value.\n"+
"Expected: %s\nActual: %s\n",
"returned output does not match expected value.\nExpected: %s\nActual: %s",
string(tc.out),
string(out),
)
Expand Down
Loading