- 13 Mar, 2019 1 commit
-
-
Michael Matloob authored
Now that tools' dependencies have been cleaned up in golang.org/cl/160837, lint doesn't have any transitive dependencies on modules that import it using the wrong path. It is now safe to reintroduce a go.mod file to this repo. I've checked using dmitshur's instructions in https://github.com/golang/lint/issues/436#issuecomment-469048301 that lint only appears with its canonical module path in the build list. Updates golang/lint#436 Change-Id: I6343aa103408b20562e17ea019602b159b899fc6 Reviewed-on: https://go-review.googlesource.com/c/lint/+/166278 Run-TryBot: Michael Matloob <matloob@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
-
- 01 Mar, 2019 1 commit
-
-
Dmitri Shuralyov authored
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: Heschi Kreinick <heschi@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 27 Feb, 2019 1 commit
-
-
Michael Matloob authored
This change adds a go.mod and go.sum file to this repo, following the requirements stated in bcmills's comment here: https://golang.org/issue/28136#issuecomment-462971974. It's important to note that we will not be adding versions to the repo for now. The change was generated by running "go mod init" and "go mod tidy" using Go 1.11.5 in the top-level directory of the repository. Updates golang/go#28136 Change-Id: I5bdb5ea44cd65042afeef675a0c3bfaa6d3c65ea Reviewed-on: https://go-review.googlesource.com/c/162913 Run-TryBot: Michael Matloob <matloob@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
-
- 17 Dec, 2018 1 commit
-
-
Michael Matloob authored
The error for variables that start with k followed by a variable name, such as "kBlah", has a lot of false positives. It's intended to avoid cases where users try to follow the Google C++ style guide or hungarian notation for constants. So it should only be reported for constants and top-level variables because those are the cases where users make this mistake. Change-Id: I7e862dbc1013707b6b9ebaa72ee07fb623dd0ce8 Reviewed-on: https://go-review.googlesource.com/c/154339Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Rebecca Stambler <rstambler@golang.org> Run-TryBot: Heschi Kreinick <heschi@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 12 Dec, 2018 1 commit
-
-
Michael Matloob authored
This lets a name such as V1_10_5 through without giving the ALL_CAPS error. Change-Id: I69576d21118f0858e6a30374b8037e28d133833a Reviewed-on: https://go-review.googlesource.com/c/152979 Run-TryBot: Michael Matloob <matloob@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 26 Oct, 2018 1 commit
-
-
Brad Fitzpatrick authored
Change-Id: I7831597c0e99f3b1bf54357f13c69b5cf97ee3d4 Reviewed-on: https://go-review.googlesource.com/c/141657Reviewed-by: Filippo Valsorda <filippo@golang.org> Reviewed-by: Andrew Bonventre <andybons@golang.org>
-
- 23 Oct, 2018 2 commits
-
-
Andrew Bonventre authored
1.8 no longer compiles, and 1.9 is no longer supported. Change-Id: I85cd9fb22dfac97486cf4e4e02cdc936af41cc31 Reviewed-on: https://go-review.googlesource.com/c/144179Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
-
alexander zillion authored
Change-Id: Ic99795cb521e8e9c1124b05628fec41c176ded25 GitHub-Last-Rev: c297132ab1723a19cbe2fa296bde03dd55144fe8 GitHub-Pull-Request: golang/lint#420 Reviewed-on: https://go-review.googlesource.com/c/143546Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 11 Oct, 2018 2 commits
-
-
Koichi Shiraishi authored
Change-Id: I3062f23e143916f0c87ec0a043f0682b8c01612a Reviewed-on: https://go-review.googlesource.com/c/141597Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Koichi Shiraishi authored
Change-Id: Ife10a16774dd6fe5d782fd893341efb262d0a22a Reviewed-on: https://go-review.googlesource.com/c/141457Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 02 Jul, 2018 1 commit
-
-
Michal Franc authored
Change-Id: I8156a1a6328fd03c153ddb648de2db43a3968536 GitHub-Last-Rev: e8f26b7b5cf97c02f306a5a615f9eabab1b5c92c GitHub-Pull-Request: golang/lint#405 Reviewed-on: https://go-review.googlesource.com/121818Reviewed-by: Andrew Bonventre <andybons@golang.org>
-
- 28 Apr, 2018 1 commit
-
-
Adam Harvey authored
Per the discussion in #400, lint is supported under the same policy as Go itself, and is not supported from a particular version any more. Change-Id: I97c9b284fb725b19143462ae22c525b22267257d GitHub-Last-Rev: 73cd8baafc34121a88c420628e24900221a170d7 GitHub-Pull-Request: golang/lint#401 Reviewed-on: https://go-review.googlesource.com/110115Reviewed-by: Andrew Bonventre <andybons@golang.org>
-
- 24 Apr, 2018 1 commit
-
-
Wei Fu authored
Update the command to `go get -u golang.org/x/lint/golint` to make it consistent with `README.md'. Change-Id: I0e20881d34a9689577d9c9f5ad74008782695c95 GitHub-Last-Rev: 096da70784bbea3fe0cd7475f857b3dd97474a30 GitHub-Pull-Request: golang/lint#398 Reviewed-on: https://go-review.googlesource.com/108995Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 19 Mar, 2018 1 commit
-
-
Marcelo Cantos authored
Fixes golang/lint#382 The fix works by moving the test for ignored nodes after the else-node check. Change-Id: I508c65ec0b49409a5a7340b5fa5ccc1ccd4a4b05 GitHub-Last-Rev: 738b20a6ab33ac6bc03664eb6887f4951ed3d067 GitHub-Pull-Request: golang/lint#383 Reviewed-on: https://go-review.googlesource.com/97256Reviewed-by: Alan Donovan <adonovan@google.com>
-
- 16 Mar, 2018 1 commit
-
-
Mat Ryer authored
This is not within the scope of golint due to the style suggestion not appearing in CodeReviewComments or Effective Go. This change: * Removes testdata/iferr.go (thus removing the test) * Removes lintIfError function and references to it Fixes #388 Change-Id: Ic639e29cafa0152ba61b222915261c37992ed71f GitHub-Last-Rev: 5bf0c7e9f6c740bcc227a987a0836f45d42613fd GitHub-Pull-Request: golang/lint#388 Reviewed-on: https://go-review.googlesource.com/100841Reviewed-by: Andrew Bonventre <andybons@golang.org>
-
- 07 Mar, 2018 2 commits
-
-
Leonel Quinteros authored
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: Andrew Bonventre <andybons@golang.org>
-
Leonel Quinteros authored
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: Andrew Bonventre <andybons@golang.org>
-
- 01 Mar, 2018 1 commit
-
-
Dominik Honnef authored
for _ = range and for _, _ = range can be written as for range instead. Change-Id: I6d5e7aecce941260f4a4de294685f99d9ff48c09 GitHub-Last-Rev: 318343fa69fea5d2e580eabddefe6ef31802f79e GitHub-Pull-Request: golang/lint#196 Reviewed-on: https://go-review.googlesource.com/96176Reviewed-by: Alan Donovan <adonovan@google.com>
-
- 28 Feb, 2018 1 commit
-
-
Avelino authored
Change-Id: I247089a69943c43815460af733268675182fab56 GitHub-Last-Rev: 76a9d79c4fa4757b064a67312d7ff2acd017778f GitHub-Pull-Request: golang/lint#359 Reviewed-on: https://go-review.googlesource.com/96155Reviewed-by: Andrew Bonventre <andybons@golang.org>
-
- 27 Feb, 2018 1 commit
-
-
Eric Chiang authored
Change-Id: I61b9adcb23d8252e53132281cf3db134f4d0a748 Reviewed-on: https://go-review.googlesource.com/97378Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 24 Feb, 2018 1 commit
-
-
Joël Stemmer authored
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: Andrew Bonventre <andybons@golang.org>
-
- 22 Feb, 2018 1 commit
-
-
Andrew Bonventre authored
Change-Id: I0d827dd750b50bf1a3da6e519f4764d4b9de0985 Reviewed-on: https://go-review.googlesource.com/96198Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 21 Feb, 2018 5 commits
-
-
Sergey Mudrik authored
Added the latest Go version: 1.9
-
Jonas Bernoulli authored
* Emacs: specify exact license in library header Emacs packages are often distributed by themselves (e.g. on Melpa and the Emacsmirror) even when they are developed in a repository that other files beside the Elisp libraries. In such cases it should still be possible to tell what the license is, so replace "BSD-style license" with "BSD-3-clause" and use the standard "License" header keyword to do so. * Emacs: cleanup whitespace * Emacs: golint: wrap and slightly improve doc-string
-
Andrew Bonventre authored
-
Andrew Bonventre authored
-
Andrew Bonventre authored
-
- 05 Jan, 2018 1 commit
-
-
Chris Smith authored
Add a test for the "error strings should not be capitalized" warning when using `errors.New`. To be honest, I don't know if this will pass or not; I assume it will.
-
- 12 Dec, 2017 2 commits
-
-
Andrew Bonventre authored
-
Yuji Yaginuma authored
`isZero` unused since 4e7ffd87.
-
- 05 Oct, 2017 1 commit
-
-
Ryan Roden-Corrent authored
Remind users that they can omit a receiver name entirely instead of using an underscore for an unused receiver argument. Fixes #310.
-
- 18 Sep, 2017 1 commit
-
-
Lev Shamardin authored
* Check for redundant if err != nil constructs. Detect and complain about constructs like: if err := foo(); err != nil { return err } return nil (Issue https://github.com/golang/lint/issues/312) * Rewrite lintIfError without using matchers. Also don't emit lint errors if there are any comments explaining the construct (between if and return statements).
-
- 02 Jun, 2017 1 commit
-
-
Dimitri Sokolyuk authored
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
-
- 25 May, 2017 1 commit
-
-
Joe Tsai authored
Fixes #239
-
- 28 Feb, 2017 1 commit
-
-
Dmitri Shuralyov authored
* Update .travis.yml for latest conventions, use fast_finish, test with -race. This change follows #277, but updates .travis.yml to use latest conventions as documented at https://docs.travis-ci.com/user/languages/go#Specifying-a-Go-version-to-use. Specifically, use master instead of tip to refer to latest (unreleased) version of Go. Use .x to target latest patch releases of each point release of Go. Use fast_finish to speed up build reporting with no semantic change. It's documented at https://blog.travis-ci.com/2013-11-27-fast-finishing-builds/. Use race detector when running tests. * Update .travis.yml to migrate from legacy to container-based infrastructure. If lint doesn't do anything that would require sudo access, it's a good idea not to require sudo access. This allows the builds to run on Travis' newer container-based infrastructure, which are not considered legacy and should run faster. See https://docs.travis-ci.com/user/migrating-from-legacy/ for details.
-
- 26 Feb, 2017 1 commit
-
-
Christoph Blecker authored
-
- 13 Feb, 2017 1 commit
-
-
Bryan Mills authored
This change suppresses the warning for functions which are: 1. exported to C via a cgo "//export" comment, and 2. not exported in the Go package. That allows functions exported to C to use idiomatic C names, but still requires that they not pollute the exported Go API. Fixes #144
-
- 09 Feb, 2017 1 commit
-
-
Joe Tsai authored
-
- 03 Feb, 2017 2 commits
-
-
haya14busa authored
Signed-off-by: Joe Tsai <joetsai@google.com>
-
Bradley Falzon authored
Signed-off-by: Joe Tsai <joetsai@google.com>
-