Skip to content

Commit

Permalink
refactor: lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dundee committed Apr 24, 2024
1 parent 79642ad commit d167352
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/gdu/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ func (a *App) createUI() (UI, error) {
ui.SetDefaultSorting(a.Flags.Sorting.By, a.Flags.Sorting.Order)
})
}
if a.Flags.ChangeCwd != false {
if a.Flags.ChangeCwd {
opts = append(opts, func(ui *tui.UI) {
ui.SetChangeCwdFn(os.Chdir)
})
Expand Down
3 changes: 2 additions & 1 deletion pkg/analyze/stored_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ func TestParentDirEncodeJSONPanics(t *testing.T) {
}
}()
dir := &ParentDir{}
dir.EncodeJSON(nil, false)
err := dir.EncodeJSON(nil, false)
assert.NoError(t, err)
}
func TestParentDirUpdateStatsPanics(t *testing.T) {
defer func() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/device/dev_freebsd_darwin_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func readMountOutput(rdr io.Reader) (Devices, error) {
for scanner.Scan() {
line := scanner.Text()

re := regexp.MustCompile("^(.*) on (/.*) \\(([^)]+)\\)$")
re := regexp.MustCompile(`^(.*) on (/.*) \(([^)]+)\)$`)
parts := re.FindAllStringSubmatch(line, -1)

if len(parts) < 1 {
Expand Down

0 comments on commit d167352

Please sign in to comment.