Describe the bug
When golangci-lint is invoked against a single file, as it is here:
This fails to properly lint a package if types are defined in another file.
To Reproduce
Steps to reproduce the behavior:
Foo in foo.go.golangci-lint run in that package, it lints fine.ERROR:[level=warning msg="[runner] Can't run linter unused: buildssa: analysis skipped: errors in package: [/github/workspace/main.go:8:8: undeclared name: Foo]" See an example run here: https://github.com/RussellRollins/super-lint-error/runs/785695971
Expected behavior
This passes linting without failures.
Screenshots

Additional context
I can see how the current solution is used to enable the "lint only changed files" feature, but this will fall down for relatively simple Go setups.
We encountered the same issue and this makes SuperLinter with Golang basically unusable.
An option to run the linter on whole directories when VALIDATE_ALL_CODEBASE is True would be extremely helpful
Hi @RussellRollins, I created a PR #370 which aims at fixing this issue. The owners of the repo want to gather some more feedback from other GO developer. If you have some time to spare can you have a look at it and leave your opinion there? Thanks!
This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.
If you think this issue should stay open, please remove the O: stale 馃 label or comment on the issue.
Slow your roll bot. This is still valid.
Sorry for the noise. Trying to keep this from getting closed.
still valid; super-linter is totally broken for golang :(
This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.
If you think this issue should stay open, please remove the O: stale 馃 label or comment on the issue.
Still valid!
This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.
If you think this issue should stay open, please remove the O: stale 馃 label or comment on the issue.
still valid
Related to #888
What would be the workaround besides disabling Super-Linter completely for go? Having the same issue.
This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.
If you think this issue should stay open, please remove the O: stale 馃 label or comment on the issue.
Not stale
This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.
If you think this issue should stay open, please remove the O: stale 馃 label or comment on the issue.
not stale
This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.
If you think this issue should stay open, please remove the O: stale 馃 label or comment on the issue.
not stale
Most helpful comment
Still valid!