Permalink
Commits on Nov 19, 2016
  1. Use new lint API

    committed Nov 19, 2016
Commits on Nov 15, 2016
  1. Remove outdated TODO

    committed Nov 15, 2016
Commits on Nov 14, 2016
Commits on Nov 11, 2016
  1. Update to new lint APIs

    committed Nov 11, 2016
  2. Ensure all test files compile

    committed Nov 11, 2016
Commits on Oct 11, 2016
  1. Suggest bytes.ContainsAny/ContainsRune instead of IndexAny/IndexRune

    bytes.ContainsAny and bytes.ContainsRune have been added in Go 1.7.
    
    Closes: gh-6
    Closes: gh-25 [via git-merge-pr]
    kostya-sh committed with Oct 10, 2016
Commits on Sep 19, 2016
  1. Detect HasPrefix use that could be TrimPrefix

    Instead of checking HasPrefix or HasSuffix and then slicing manually,
    one can use TrimPrefix and TrimSuffix instead.
    
    Idea-By: Dmitri Shuralyov <shurcooL@gmail.com>
    committed Sep 19, 2016
Commits on Sep 17, 2016
Commits on Aug 2, 2016
  1. Fix a few false positives for "x != nil && len(x) ... " check

    Fix the following false positives:
    
    - x != nil && len(x) == [non zero constant or non constant]
    - x != nil && len(x) >= [zero constant or non constant]
    - x != nil && len(x) < or <= [any expression]
    
    Closes: gh-18
    Closes: gh-19 [via git-merge-pr]
    kostya-sh committed with Jul 29, 2016
Commits on Aug 1, 2016
  1. Fix false-positive on copy from slice to map

    Closes: gh-21 [via git-merge-pr]
    hectorj committed with Aug 1, 2016
Commits on Jul 13, 2016
  1. Update for testutil changes

    committed Jul 13, 2016
Commits on Jul 11, 2016
  1. Avoid crash in FormatInt check

    committed Jul 11, 2016
Commits on Jul 4, 2016
  1. Don't suggest simpler return with interfaces

    The pattern
    
      if v != nil {
        return v
      }
      return nil
    
    can not be simplified to
    
      return v
    
    if the function's return type is an interface while v is not.
    
    Closes gh-14
    committed Jul 4, 2016
Commits on May 7, 2016
  1. Simplify code

    Dogfeeding.
    committed May 7, 2016
  2. Suggest strconv.Itoa instead of strconv.FormatInt

    Idea-By: Dmitri Shuralyov <shurcooL@gmail.com>
    committed May 7, 2016
Commits on Apr 22, 2016
Commits on Apr 19, 2016
  1. Simplify _ = <-ch to just <-ch

    committed Apr 19, 2016
Commits on Apr 13, 2016
  1. Account for else clauses in if return simplification

    Closes: gh-7 [via git-merge-pr]
    reillywatson committed with Apr 13, 2016
Commits on Apr 8, 2016
  1. Detect unnecessary if before return

    Flag this code
    
        if err != nil {
          return err
        }
        return nil
    
    and recommend
    
        return err
    committed Apr 8, 2016
Commits on Apr 7, 2016
  1. Detect time.Now().Sub and suggest time.Since

    Idea-By: Dave Cheney <dave@cheney.net>
    committed Apr 7, 2016
  2. Detect unnecessary loops for append

    Find the following pattern
    
        for _, v := range s1 {
            s2 = append(s2, v)
        }
    
    and suggest
    
        s2 = append(s2, s1...)
    
    Idea-By: Dmitri Shuralyov <shurcooL@gmail.com>
    committed Apr 7, 2016
Commits on Apr 6, 2016
  1. Flag unnecessary second index in slice

    Closes gh-4
    committed Apr 6, 2016
Commits on Apr 4, 2016
Commits on Apr 2, 2016