go/go/analysis
Erik Dubbelboer 371fc67d3b go/tools: add check for time formats with 2006-02-01
yyyy-dd-mm is a time format that isn't really used anywhere [1]. It is
much more likely that the user intended to use yyyy-mm-dd instead and
made a mistake. This happens quite often [2] because of the unusual way
to handle time formatting and parsing in Go. Since the mistake is Go
specific and happens so often a vet check will be useful.

1. https://stackoverflow.com/questions/2254014/are-there-locales-or-common-programs-that-use-yyyy-dd-mm-as-the-date-format
2. https://github.com/search?l=&p=1&q=%222006-02-01%22+language%3AGo&type=Code

Updates golang/go#48801

Change-Id: I20960c93710766f20a7df90873bff960dea41b28
GitHub-Last-Rev: 496b9917b5eda0525cb75d04a3487d174ccf8fea
GitHub-Pull-Request: golang/tools#342
Reviewed-on: https://go-review.googlesource.com/c/tools/+/354010
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tim King <taking@google.com>
Run-TryBot: Tim King <taking@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2022-08-03 20:00:23 +00:00
..
analysistest internal/span: make NewRange accept File, not FileSet 2022-07-06 19:40:50 +00:00
doc tools: fix some typos 2022-03-24 22:24:35 +00:00
internal go/analysis/internal/checker: log codeFact error, remove unused action.inputs 2022-06-14 18:53:22 +00:00
multichecker all: go fmt ./... 2021-02-20 03:28:52 +00:00
passes go/tools: add check for time formats with 2006-02-01 2022-08-03 20:00:23 +00:00
singlechecker go/analysis: gofmt 2022-04-12 17:43:14 +00:00
unitchecker go/analysis: gofmt 2022-04-12 17:43:14 +00:00
analysis.go all: add copyright notices to files that are missing them 2021-01-06 17:23:47 +00:00
diagnostic.go all: add copyright notices to files that are missing them 2021-01-06 17:23:47 +00:00
doc.go go/analysis: document need for deterministic Fact encoding 2022-06-06 15:25:04 +00:00
validate.go go/analysis: validate report if analyzer.Run is empty 2022-03-30 03:52:37 +00:00
validate_test.go go/analysis: validate report if analyzer.Run is empty 2022-03-30 03:52:37 +00:00