1. 08 12月, 2020 1 次提交
  2. 03 3月, 2020 1 次提交
  3. 31 1月, 2020 1 次提交
  4. 26 11月, 2019 1 次提交
  5. 01 10月, 2019 1 次提交
  6. 10 9月, 2019 1 次提交
    • S
      lint: remove the var decl check · 414d861b
      Sam Whited 提交于
      Removes the var decl check which often fires when the type is required
      for documentation purposes. For example, when an enumerated list of
      pre-defined values of a certain type is created, it may be desirable to
      group those values under the type itself in the docs. If the type is
      infered, godoc will not group them, but if the type is manually listed
      they will be placed in the correct location.
      
      Since this lint is not an important stylistic consideration and
      frequently produces false positives, removing it is consistent with the
      scope of lints in this project.
      
      Fixes golang/lint#429
      
      Change-Id: I2afd928eae0bb11b39886c045556cda0771e3af5
      Reviewed-on: https://go-review.googlesource.com/c/lint/+/191317
      Run-TryBot: Sam Whited <sam@samwhited.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: NAndrew Bonventre <andybons@golang.org>
      414d861b
  7. 10 4月, 2019 1 次提交
  8. 13 3月, 2019 1 次提交
  9. 02 3月, 2019 1 次提交
    • D
      Revert "all: add a go.mod file" · 5614ed5b
      Dmitri Shuralyov 提交于
      This reverts commit 5b3e6a55.
      
      Adding a go.mod file has started to cause go get -u golang.org/x/lint
      to fail in module mode. This is issue golang/lint#436. Remove the
      go.mod file for now in order to resolve the issue. We will re-add
      the go.mod file to this repository again when it's a better time
      to do so.
      
      Change-Id: I9d63410de03ddca617ddb5ef86effba9f6bd3577
      Reviewed-on: https://go-review.googlesource.com/c/164641
      Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
      Reviewed-by: NHeschi Kreinick <heschi@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      5614ed5b
  10. 28 2月, 2019 1 次提交
  11. 18 12月, 2018 1 次提交
  12. 13 12月, 2018 1 次提交
  13. 27 10月, 2018 1 次提交
  14. 24 10月, 2018 1 次提交
  15. 23 10月, 2018 1 次提交
  16. 12 10月, 2018 1 次提交
  17. 11 10月, 2018 1 次提交
  18. 03 7月, 2018 1 次提交
  19. 29 4月, 2018 1 次提交
  20. 25 4月, 2018 1 次提交
  21. 20 3月, 2018 1 次提交
  22. 17 3月, 2018 1 次提交
  23. 08 3月, 2018 2 次提交
    • L
      lint: allow multiple error return values · 83796723
      Leonel Quinteros 提交于
      When returning multiple values with an error,
      lint checks if the error is the last return value.
      But the implementation actually is checking for all return values
      except for the last one, and throw the alert if it found an error.
      
      There is a (edge) case where some function returning more than one error
      is getting a false positive even when the last return value is an error.
      
      This patch adds an early check, to see if the last return value is an error
      and if so, it will pass silently.
      
      Fixes golang/lint#286
      
      Change-Id: Ib3ad50ed127cdab6ac63e9d89c1c97f4a641f972
      GitHub-Last-Rev: 9dd9de4fce5fccc846d010cc1c57720e33da85aa
      GitHub-Pull-Request: golang/lint#387
      Reviewed-on: https://go-review.googlesource.com/99295Reviewed-by: NAndrew Bonventre <andybons@golang.org>
      83796723
    • L
      lint: avoid false positives with custom errors-package · c72d1a52
      Leonel Quinteros 提交于
      When using `errors.New(fmt.Sprintf(...))`,
      lint will alert that you should use `fmt.Errorf(...)`.
      
      Before this patch, this alert was also displayed
      when using a custom errors-package.
      There are valid use cases to use `errors.New(fmt.Sprintf(...))`
      in a custom errors-package context.
      
      This patch avoids the "false positive" alert
      when a custom errors-package is imported in the current file.
      
      Fixes golang/lint#350
      
      Change-Id: I7cc82a3435b184f8b4cad0752a75d44f33536dce
      GitHub-Last-Rev: ad257d26802aca316d6b83758fcb143083934587
      GitHub-Pull-Request: golang/lint#360
      Reviewed-on: https://go-review.googlesource.com/96091Reviewed-by: NAndrew Bonventre <andybons@golang.org>
      c72d1a52
  24. 02 3月, 2018 1 次提交
  25. 01 3月, 2018 1 次提交
  26. 28 2月, 2018 1 次提交
  27. 24 2月, 2018 1 次提交
    • J
      Add check for MixedCaps in package name · 3ea3fa98
      Joël Stemmer 提交于
      Lint already checks for underscores in package names, but did not yet
      check for lower case names. The section on Package names in the
      Effective Go document states that "By convention, packages packages are
      given lower case, single-word names; there should be no need for
      underscores or mixedCaps."
      
      GitHub-Last-Rev: 91b0fc6545806c03760f2ceef4d148271965bbc9
      GitHub-Pull-Request: golang/lint#285
      Change-Id: Ibb234166360b67f0f561b463a951a87399cad1d3
      Reviewed-on: https://go-review.googlesource.com/96080Reviewed-by: NAndrew Bonventre <andybons@golang.org>
      3ea3fa98
  28. 22 2月, 2018 6 次提交
  29. 06 1月, 2018 1 次提交
  30. 12 12月, 2017 2 次提交
  31. 06 10月, 2017 1 次提交
  32. 19 9月, 2017 1 次提交
  33. 03 6月, 2017 1 次提交
    • D
      Fix lint on packages with all generated files · c5fb716d
      Dimitri Sokolyuk 提交于
      A package with all generated files will reduce to a set with no
      source files, which causes lint to panic on a nil-pointer dereference.
      Move the conditional check for an empty package until after we
      have checked the package for generated files.
      
      Fixes #300
      c5fb716d