Skip to content

mispell in strings #522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rekby opened this issue Apr 28, 2019 · 1 comment
Closed

mispell in strings #522

rekby opened this issue Apr 28, 2019 · 1 comment

Comments

@rekby
Copy link

rekby commented Apr 28, 2019

embedded mispell did't find typo:
https://github.com/rekby/lets-proxy2/blob/4bbef7bf61ae15c3d4787f714e67a82397ef4a7b/internal/acme_client_manager/client_manager.go#L102

but standalone mispell did:

misspell internal/acme_client_manager/client_manager.go 
internal/acme_client_manager/client_manager.go:102:47: "becouse" is a misspelling of "because"

info:

  1. golangci-lint has version 1.16.0 built from 97ea1cb on 2019-03-31T19:48:46Z

  2. config:

service:
  golangci-lint-version: 1.16.0
run:
  deadline: 5m
  issues-exit-code: 1

linters-settings:
  lll:
    line-length: 200
  misspell:
    locale: US
linters:
  enable-all: true
  disable:
    - gochecknoglobals
  1. Go env
go version && go env
go version go1.12.4 darwin/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/rekby/Library/Caches/go-build"
GOEXE=""
GOFLAGS=" -mod=vendor"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/rekby/go"
GOPROXY="direct"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12.4/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12.4/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/rekby/projects/rekby/lets-proxy2/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/8_/68c7r6rj6xg4fpjls__qtsjn18s1hz/T/go-build514206358=/tmp/go-build -gno-record-gcc-switches -fno-common"
  1. Verbose output of running: golangci-lint run -v
golangci-lint run -v
INFO [config_reader] Config search paths: [./ /Users/rekby/projects/rekby/lets-proxy2 /Users/rekby/projects/rekby /Users/rekby/projects /Users/rekby /Users /] 
INFO [config_reader] Used config file .golangci.yml 
INFO [lintersdb] Active 30 linters: [deadcode depguard dupl errcheck gochecknoinits goconst gocritic gocyclo gofmt goimports golint gosec gosimple govet ineffassign interfacer lll maligned misspell nakedret prealloc scopelint staticcheck structcheck stylecheck typecheck unconvert unparam unused varcheck] 
INFO [lintersdb] Optimized sublinters [staticcheck gosimple unused stylecheck] into metalinter megacheck 
INFO [loader] Go packages loading at mode load deps types and syntax took 1.21843071s 
INFO [loader] SSA repr building timing: packages building 13.510401ms, total 173.913842ms 
INFO [runner] worker.7 took 395.956076ms with stages: unparam: 374.895453ms, varcheck: 5.88883ms, deadcode: 4.381402ms, errcheck: 3.953504ms, unconvert: 3.214317ms, maligned: 1.895866ms, goconst: 1.662821ms, gochecknoinits: 32.896µs, typecheck: 3.153µs 
INFO [runner] worker.6 took 396.984319ms with stages: gofmt: 315.512299ms, ineffassign: 78.783258ms, gocyclo: 2.654273ms, depguard: 13.063µs 
INFO [runner] worker.1 took 397.861607ms with stages: goimports: 397.858248ms 
INFO [runner] worker.3 took 402.967917ms with stages: misspell: 252.034809ms, interfacer: 130.095186ms, lll: 16.035307ms, structcheck: 3.247488ms, nakedret: 1.536961ms 
INFO [runner] worker.8 took 407.00405ms with stages: dupl: 340.22444ms, gocritic: 66.769665ms 
INFO [runner] worker.5 took 414.045578ms with stages: govet: 291.975585ms, gosec: 118.437032ms, prealloc: 1.87028ms, scopelint: 1.741236ms 
INFO [runner] worker.2 took 887.216904ms with stages: golint: 887.20653ms 
INFO [runner] worker.4 took 1.208344709s with stages: megacheck: 1.208332629s 
INFO [runner] Workers idle times: #1: 810.292578ms, #2: 321.081239ms, #3: 805.303834ms, #5: 794.260707ms, #6: 811.043117ms, #7: 812.316672ms, #8: 801.270313ms 
INFO [runner] Issues before processing: 155, after processing: 0 
INFO [runner] processing took 119.990657ms with stages: skip_dirs: 40.670854ms, cgo: 39.014586ms, nolint: 29.670254ms, autogenerated_exclude: 4.341897ms, exclude: 3.973124ms, identifier_marker: 2.033601ms, path_prettifier: 249.105µs, exclude-rules: 10.748µs, diff: 3.669µs, uniq_by_line: 3.509µs, max_same_issues: 3.282µs, replacement_builder: 3.268µs, source_code: 3.229µs, skip_files: 3.02µs, max_from_linter: 2.527µs, path_shortener: 2.076µs, max_per_file_from_linter: 1.908µs 
INFO File cache stats: 0 entries of total size 0B 
INFO Memory: 28 samples, avg is 508.5MB, max is 1078.6MB 
INFO Execution took 2.749343637s                  
jirfag added a commit that referenced this issue Jun 9, 2019
Treat Go source files as plain text files by misspell: it allows detecting
issues in strings, variable names, etc. Also, it's the default mode of
a standalone misspell tool.

Also, implement richer and more stable auto-fix of misspell issues:
now it can fix multiple issues in one line.
@jirfag
Copy link
Contributor

jirfag commented Jun 9, 2019

Hi, thank you for the report! The reason that golangci-lint doesn't find issues inside strings is that we run misspell in go mode. But a standalone misspell runs in plain text mode by default. I've fixed it: now golangci-lint runs in plain text mode too: it allows searching of issues inside strings, variable name, etc. The fix is in #561

jirfag added a commit that referenced this issue Jun 9, 2019
Treat Go source files as plain text files by misspell: it allows detecting
issues in strings, variable names, etc. Also, it's the default mode of
a standalone misspell tool.

Also, implement richer and more stable auto-fix of misspell issues:
now it can fix multiple issues in one line.
jirfag added a commit that referenced this issue Jun 9, 2019
Treat Go source files as plain text files by misspell: it allows detecting
issues in strings, variable names, etc. Also, it's the default mode of
a standalone misspell tool.

Also, implement richer and more stable auto-fix of misspell issues:
now it can fix multiple issues in one line.
@jirfag jirfag closed this as completed in 3d78f64 Jun 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants