Skip to content

Conversation

ldez
Copy link
Member

@ldez ldez commented Mar 19, 2024

90% of the contexts that lead to no go files to analyze error are related to missing go mod tidy.

A sample of issues on the topic:

Before:

$ golangci-lint run ./...                           
ERRO Running error: context loading failed: no go files to analyze 

After:

$ ./golangci-lint run ./...                                                     
ERRO Running error: context loading failed: no go files to analyze: running `go mod tidy` may solve the problem 

Fixes #3335
Fixes #825

@ldez ldez added the enhancement New feature or improvement label Mar 19, 2024
@ldez ldez added this to the next milestone Mar 19, 2024
@ldez ldez requested review from alexandear and bombsimon March 19, 2024 02:14
@ldez ldez merged commit cba35e1 into golangci:master Mar 19, 2024
@ldez ldez deleted the feat/no-go-files branch March 19, 2024 13:25
@nyetwurk
Copy link

nyetwurk commented Mar 19, 2024

This isn't terribly useful, it would be good to have more information about what is going on in that dedupilication step.

See #825 (comment)

@ldez
Copy link
Member Author

ldez commented Mar 19, 2024

As I said in the description: it's useful in 90% of the cases, then it's not perfect.

If you want more information about the deduplication step, you just have to run the following command:

GL_DEBUG=loader golangci-lint run

@ldez ldez mentioned this pull request Sep 5, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

no go files to analyze context loading failed: no go files to analyze
4 participants