Skip to content

Commit bafefe4

Browse files
committed
Add go mod init to quick-start
Updated documentation to make it clear that a `go.mod` file is required to run `golangci-lint`
1 parent 4bc68c0 commit bafefe4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/src/docs/usage/faq.mdx

+6
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,9 @@ Long answer:
4040

4141
Because the first run caches type information. All subsequent runs will be fast.
4242
Usually this options is used during development on local machine and compilation was already performed.
43+
44+
## How does `golangci-lint` find go source files?
45+
46+
`golangci-lint` uses go modules to find golang files. If your project is a go module, it should *just work*.
47+
48+
If your project is not a go module, you can still use `golangci-lint` for your project. You can do this by setting the environment variable `GO111MODULE=off` when you run `golangci-lint`. Make sure you set this in your CI toolchain appropriately.

0 commit comments

Comments
 (0)