Skip to content

Commit

Permalink
chore: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Feb 19, 2024
1 parent 2cc38ac commit 201b6e6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/misspell/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func main() {
//
// Stuff to ignore
//
if len(*ignores) > 0 {
if *ignores != "" {
r.RemoveRule(strings.Split(*ignores, ","))
}

Expand Down Expand Up @@ -188,7 +188,7 @@ func main() {
defaultWrite = tmpl
defaultRead = tmpl
stdout.Println(sqliteHeader)
case len(*format) > 0:
case *format != "":
t, err := template.New("custom").Parse(*format)
if err != nil {
log.Fatalf("Unable to compile log format: %s", err)
Expand Down
2 changes: 1 addition & 1 deletion ignore/glob.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func NewBaseGlobMatch(arg string, truth bool) (*GlobMatch, error) {
// Arg true should be set to false if the output is inverted.
func NewPathGlobMatch(arg string, truth bool) (*GlobMatch, error) {
// if starts with "/" then glob only applies to top level
if len(arg) > 0 && arg[0] == '/' {
if arg != "" && arg[0] == '/' {
arg = arg[1:]
}

Expand Down
2 changes: 1 addition & 1 deletion notwords.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var (
func RemovePath(s string) string {
out := bytes.Buffer{}
var idx int
for len(s) > 0 {
for s != "" {
if idx = strings.IndexByte(s, '/'); idx == -1 {
out.WriteString(s)
break
Expand Down

0 comments on commit 201b6e6

Please sign in to comment.