Skip to content

Lint errors #201

Description

@duanehoward

After getting new linters up and running it dumps the following improvements, we should address them.

  lex.go:268:8: QF1001: could apply De Morgan's law (staticcheck)
  		case !(unicode.IsLetter(r) || unicode.IsDigit(r) || (l.len() > 0 && r == '-')):
  		     ^
  parser.go:114:31: QF1004: could use strings.ReplaceAll instead (staticcheck)
  			r, err := hex.DecodeString(strings.Replace(strings.Trim(h, "|"), " ", "", -1))
  parser.go:411:9: QF1004: could use strings.ReplaceAll instead (staticcheck)
  	return strings.Replace(s, `\"`, `"`, -1)
  	       ^
 rule.go:853:13: QF1004: could use bytes.ReplaceAll instead (staticcheck)
  		pattern = bytes.Replace(pattern, []byte(`"`), []byte(`\"`), -1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions