Skip to content

Can't parse date when running  #3087

Closed
@J4cku

Description

@J4cku

Welcome

  • Yes, I'm using a binary release within 2 latest major releases. Only such installations are supported.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've included all information below (version, config, etc).
  • Yes, I've tried with the standalone linter if available. (https://golangci-lint.run/usage/linters/)

Description of the problem

When running golangci-lint run -E gofmt I am shown an error:

WARN [linters context] structcheck is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649. 
ERRO Running error: 1 error occurred:
        * can't run linter goanalysis_metalinter: goimports: can't extract issues from gofmt diff output "--- /Users/jacek.leszczynski/RiderProjects/reporting-tools/go/rot/client/reporting.go.orig\t2022-08-10 12:30:31\n+++ /Users/jacek.leszczynski/RiderProjects/reporting-tools/go/rot/client/reporting.go\t2022-08-10 12:30:31\n@@ -4,8 +4,9 @@\n \t\"context\"\n \t\"encoding/json\"\n \t\"fmt\"\n-\t\"github.com/Fonoa-Tech/reporting-api/generated/contracts\"\n \t\"net/url\"\n+\n+\t\"github.com/Fonoa-Tech/reporting-api/generated/contracts\"\n )\n \n type ReportingClient struct {\n": can't parse patch: parsing time "2022-08-10 12:30:31" as "2006-01-02 15:04:05 -0700": cannot parse "" as "-0700"

Version of golangci-lint

golangci-lint has version 1.46.2 built from a333689 on 2022-05-17T06:05:08Z

Configuration file

---
run:
  timeout: 3m
  build-tags:
    - integration

linters:
  enable:
    - misspell
    - goimports
    - revive
    - gofmt
    - depguard
    - godot

Go environment

go version go1.18.2 darwin/arm64
GO111MODULE="on"
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/jacek.leszczynski/Library/Caches/go-build"
GOENV="/Users/jacek.leszczynski/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/jacek.leszczynski/gopath/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/jacek.leszczynski/gopath"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/homebrew/Cellar/go/1.18.2/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/homebrew/Cellar/go/1.18.2/libexec/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.18.2"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/jacek.leszczynski/RiderProjects/reporting-tools/go/rot/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/jc/2hzf075172155k8m2zswff540000gq/T/go-build2249922677=/tmp/go-build -gno-record-gcc-switches -fno-common"

Verbose output of running

INFO [config_reader] Config search paths: [./ /Users/jacek.leszczynski/RiderProjects/reporting-tools/go/rot /Users/jacek.leszczynski/RiderProjects/reporting-tools/go /Users/jacek.leszczynski/RiderProjects/reporting-tools /Users/jacek.leszczynski/RiderProjects /Users/jacek.leszczynski /Users /] 
INFO [config_reader] Used config file .golangci.yml 
INFO [lintersdb] Active 16 linters: [deadcode depguard errcheck godot gofmt goimports gosimple govet ineffassign misspell revive staticcheck structcheck typecheck unused varcheck] 
INFO [loader] Using build tags: [integration]     
INFO [loader] Go packages loading at mode 575 (imports|deps|exports_file|files|name|types_sizes|compiled_files) took 379.585375ms 
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 3.7755ms 
INFO [linters context/goanalysis] analyzers took 14.276696194s with top 10 stages: buildir: 9.462551828s, inspect: 803.317455ms, fact_deprecated: 507.355007ms, ctrlflow: 430.351534ms, nilness: 429.363872ms, printf: 362.387388ms, fact_purity: 344.798673ms, SA5012: 280.363134ms, the_only_name: 212.144167ms, typedness: 206.551703ms 
WARN [runner] Can't run linter goanalysis_metalinter: goimports: can't extract issues from gofmt diff output "--- /Users/jacek.leszczynski/RiderProjects/reporting-tools/go/rot/client/reporting.go.orig\t2022-08-10 12:33:15\n+++ /Users/jacek.leszczynski/RiderProjects/reporting-tools/go/rot/client/reporting.go\t2022-08-10 12:33:15\n@@ -4,8 +4,9 @@\n \t\"context\"\n \t\"encoding/json\"\n \t\"fmt\"\n-\t\"github.com/Fonoa-Tech/reporting-api/generated/contracts\"\n \t\"net/url\"\n+\n+\t\"github.com/Fonoa-Tech/reporting-api/generated/contracts\"\n )\n \n type ReportingClient struct {\n": can't parse patch: parsing time "2022-08-10 12:33:15" as "2006-01-02 15:04:05 -0700": cannot parse "" as "-0700" 
WARN [linters context] structcheck is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649. 
INFO [runner] processing took 2.708µs with stages: max_same_issues: 958ns, nolint: 334ns, max_from_linter: 333ns, skip_dirs: 208ns, severity-rules: 84ns, max_per_file_from_linter: 84ns, filename_unadjuster: 84ns, cgo: 83ns, autogenerated_exclude: 83ns, skip_files: 42ns, path_prefixer: 42ns, path_prettifier: 42ns, path_shortener: 42ns, sort_results: 42ns, diff: 42ns, exclude: 41ns, exclude-rules: 41ns, identifier_marker: 41ns, source_code: 41ns, uniq_by_line: 41ns 
INFO [runner] linters took 4.578902583s with stages: goanalysis_metalinter: 4.57884975s, structcheck: 10.291µs 
ERRO Running error: 1 error occurred:
        * can't run linter goanalysis_metalinter: goimports: can't extract issues from gofmt diff output "--- /Users/jacek.leszczynski/RiderProjects/reporting-tools/go/rot/client/reporting.go.orig\t2022-08-10 12:33:15\n+++ /Users/jacek.leszczynski/RiderProjects/reporting-tools/go/rot/client/reporting.go\t2022-08-10 12:33:15\n@@ -4,8 +4,9 @@\n \t\"context\"\n \t\"encoding/json\"\n \t\"fmt\"\n-\t\"github.com/Fonoa-Tech/reporting-api/generated/contracts\"\n \t\"net/url\"\n+\n+\t\"github.com/Fonoa-Tech/reporting-api/generated/contracts\"\n )\n \n type ReportingClient struct {\n": can't parse patch: parsing time "2022-08-10 12:33:15" as "2006-01-02 15:04:05 -0700": cannot parse "" as "-0700"
 
INFO Memory: 51 samples, avg is 823.6MB, max is 1302.8MB 
INFO Execution took 4.980535375s 

Code example or link to a public repository

Can't share code

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions