Skip to content

no problems reported when given an absolute path to a null module #592

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
bhcleek opened this issue Jun 30, 2019 · 3 comments
Closed

no problems reported when given an absolute path to a null module #592

bhcleek opened this issue Jun 30, 2019 · 3 comments
Labels
bug Something isn't working stale No recent correspondence or work activity

Comments

@bhcleek
Copy link

bhcleek commented Jun 30, 2019

reproduction

Try to lint a directory with files that are missing godoc in a null module with golint

demonstration

Here's a script to demonstrate the problem:

#!/bin/sh

cd $(mktemp -d)

cat <<EOF > lint.go
package lint

import "fmt"

func MissingDoc() {
	fmt.Println("missing doc")
}
EOF

printf "linting a file\n" >&2
golangci-lint run -v --print-issued-lines=false --disable-all --exclude-use-default=false --enable=golint $PWD/lint.go

printf "linting a directory in a null module\n" >&2
golangci-lint run -v --print-issued-lines=false --disable-all --exclude-use-default=false --enable=golint $PWD

go mod init lint

printf "linting a directory in a module\n" >&2
golangci-lint run -v --print-issued-lines=false --disable-all --exclude-use-default=false --enable=golint $PWD

expected result

missing godoc is correctly identified

actual result

no errors are reported

environment
  1. Version of golangci-lint: f8a5a8c
  2. Config file: none
  3. Go environment:
go version go1.12.4 darwin/amd64
GOARCH="amd64"
GOBIN="/Users/bhcleek/go/bin"
GOCACHE="/Users/bhcleek/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/bhcleek/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
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/f9/d6g779t53gq_20w0zm2f_1zm0000gn/T/go-build592573986=/tmp/go-build -gno-record-gcc-switches -fno-common"
@stale
Copy link

stale bot commented Mar 27, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale No recent correspondence or work activity label Mar 27, 2020
@bhcleek
Copy link
Author

bhcleek commented Mar 28, 2020

more activity. This needs to be fixed.

@stale stale bot removed the stale No recent correspondence or work activity label Mar 28, 2020
@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale No recent correspondence or work activity label Apr 16, 2022
@stale stale bot closed this as completed Jul 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale No recent correspondence or work activity
Projects
None yet
Development

No branches or pull requests

2 participants