Skip to content

misspell can't be excluded if line is too long #924

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
3 tasks done
gballet opened this issue Jan 16, 2020 · 1 comment
Closed
3 tasks done

misspell can't be excluded if line is too long #924

gballet opened this issue Jan 16, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@gballet
Copy link

gballet commented Jan 16, 2020

When the misspell linter tries to go over a line that is too long, it will show a warning. This warning will appear even if misspell is excluded for that file.

Thank you for creating the issue!

  • 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).

Please include the following information:

Version of golangci-lint
$ golangci-lint --version
golangci-lint has version v1.22.2 built from (unknown, mod sum: "h1:iaihss3Tf6NvZVjun3lHimKSgofPV1+FqE/cbehoiRQ=") on (unknown)
Config file
$ cat .golangci.yml
# This file configures github.com/golangci/golangci-lint.

run:
  timeout: 2m
  tests: true
  # default is true. Enables skipping of directories:
  #   vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
  skip-dirs-use-default: true
  skip-files:
    - core/genesis_alloc.go

linters:
  disable-all: true
  enable:
    - deadcode
    - goconst
    - goimports
    - gosimple
    - govet
    - ineffassign
    - misspell
    # - staticcheck
    - unconvert
    # - unused
    - varcheck

linters-settings:
  gofmt:
    simplify: true
  goconst:
    min-len: 3 # minimum length of string constant
    min-occurrences: 6 # minimum number of occurrences

issues:
  exclude-rules:
    - path: crypto/blake2b/
      linters:
        - deadcode
    - path: crypto/bn256/cloudflare
      linters:
        - deadcode
    - path: p2p/discv5/
      linters:
        - deadcode
    - path: core/vm/instructions_test.go
      linters:
        - goconst
    - path: cmd/faucet/
      linters:
        - deadcode
    - path: core/genesis_alloc.go
      linters:
        - misspell
Go environment
$ go version && go env
go version go1.13 linux/arm64
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/home/gballet/.cache/go-build"
GOENV="/home/gballet/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/gballet/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_arm64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/gballet/go/src/github.com/ethereum/go-ethereum/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 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build350194322=/tmp/go-build -gno-record-gcc-switches"
Verbose output of running
>>> build/cache/golangci-lint-1.22.2-linux-amd64/golangci-lint run --config .golangci.yml ./...

WARN [runner] Can't process result by autogenerated_exclude processor: can't filter issue result.Issue{FromLinter:"misspell", Text:"`ect` is a misspelling of `etc`", SourceLines:[]string(nil), Replacement:(*result.Replacement)(0xc00f0098f0), Pkg:(*packages.Package)(0xc001691770), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"core/genesis_alloc.go", Offset:0, Line:24, Column:64842}, HunkPos:0}: failed to get doc of file core/genesis_alloc.go: failed to scan file: bufio.Scanner: token too long 
@tpounds tpounds added the bug Something isn't working label Jan 19, 2020
@ernado
Copy link
Member

ernado commented Feb 4, 2020

Seems like was fixed when dealing with #954 in v1.23.3.
Please check again and feel free to reopen.

@ernado ernado closed this as completed Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants