Skip to content

Commit 2c95a1d

Browse files
chore: update gofumpt from v0.4.0 to v0.8.0 (#18652)
1 parent 494dccc commit 2c95a1d

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,16 +460,16 @@ ifdef FILE
460460
# Format single file
461461
if [[ -f "$(FILE)" ]] && [[ "$(FILE)" == *.go ]] && ! grep -q "DO NOT EDIT" "$(FILE)"; then \
462462
echo "$(GREEN)==>$(RESET) $(BOLD)fmt/go$(RESET) $(FILE)"; \
463-
go run mvdan.cc/gofumpt@v0.4.0 -w -l "$(FILE)"; \
463+
go run mvdan.cc/gofumpt@v0.8.0 -w -l "$(FILE)"; \
464464
fi
465465
else
466466
go mod tidy
467467
echo "$(GREEN)==>$(RESET) $(BOLD)fmt/go$(RESET)"
468468
# VS Code users should check out
469469
# https://github.com/mvdan/gofumpt#visual-studio-code
470470
find . $(FIND_EXCLUSIONS) -type f -name '*.go' -print0 | \
471-
xargs -0 grep --null -L "DO NOT EDIT" | \
472-
xargs -0 go run mvdan.cc/gofumpt@v0.4.0 -w -l
471+
xargs -0 grep -E --null -L '^// Code generated .* DO NOT EDIT\.$$' | \
472+
xargs -0 go run mvdan.cc/gofumpt@v0.8.0 -w -l
473473
endif
474474
.PHONY: fmt/go
475475

agent/agentcontainers/dcspec/gen.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ fi
6161
exec 3>&-
6262

6363
# Format the generated code.
64-
go run mvdan.cc/gofumpt@v0.4.0 -w -l "${TMPDIR}/${DEST_FILENAME}"
64+
go run mvdan.cc/gofumpt@v0.8.0 -w -l "${TMPDIR}/${DEST_FILENAME}"
6565

6666
# Add a header so that Go recognizes this as a generated file.
6767
if grep -q -- "\[-i extension\]" < <(sed -h 2>&1); then

cli/configssh.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ func (r *RootCmd) configSSH() *serpent.Command {
446446

447447
if !bytes.Equal(configRaw, configModified) {
448448
sshDir := filepath.Dir(sshConfigFile)
449-
if err := os.MkdirAll(sshDir, 0700); err != nil {
449+
if err := os.MkdirAll(sshDir, 0o700); err != nil {
450450
return xerrors.Errorf("failed to create directory %q: %w", sshDir, err)
451451
}
452452

cli/configssh_test.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,11 @@ func TestConfigSSH_MissingDirectory(t *testing.T) {
204204
_, err = os.Stat(sshConfigPath)
205205
require.NoError(t, err, "config file should exist")
206206

207-
// Check that the directory has proper permissions (0700)
207+
// Check that the directory has proper permissions (rwx for owner, none for
208+
// group and everyone)
208209
sshDirInfo, err := os.Stat(sshDir)
209210
require.NoError(t, err)
210-
require.Equal(t, os.FileMode(0700), sshDirInfo.Mode().Perm(), "directory should have 0700 permissions")
211+
require.Equal(t, os.FileMode(0o700), sshDirInfo.Mode().Perm(), "directory should have rwx------ permissions")
211212
}
212213

213214
func TestConfigSSH_FileWriteAndOptionsFlow(t *testing.T) {
@@ -358,7 +359,8 @@ func TestConfigSSH_FileWriteAndOptionsFlow(t *testing.T) {
358359
strings.Join([]string{
359360
headerEnd,
360361
"",
361-
}, "\n")},
362+
}, "\n"),
363+
},
362364
},
363365
args: []string{"--ssh-option", "ForwardAgent=yes"},
364366
matches: []match{
@@ -383,7 +385,8 @@ func TestConfigSSH_FileWriteAndOptionsFlow(t *testing.T) {
383385
strings.Join([]string{
384386
headerEnd,
385387
"",
386-
}, "\n")},
388+
}, "\n"),
389+
},
387390
},
388391
args: []string{"--ssh-option", "ForwardAgent=yes"},
389392
matches: []match{

coderd/notifications/utils_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ func (i *dispatchInterceptor) Dispatcher(payload types.MessagePayload, title, bo
9494
}
9595

9696
retryable, err = deliveryFn(ctx, msgID)
97-
9897
if err != nil {
9998
i.err.Add(1)
10099
i.lastErr.Store(err)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy