-
-
Notifications
You must be signed in to change notification settings - Fork 237
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
Update terraform_terrascan.md #1574
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Will be done after V6 release :) ( note: MD files are not directly written, but generated from YML descriptors ^^ ) |
Thanks |
Done in v6 :) |
wandering-tales
added a commit
to wandering-tales/megalinter
that referenced
this pull request
Apr 26, 2024
It seems `list_of_files` is not the right choice as default lint mode for the `golangci-lint` linter, for several reasons. In such mode, the changed `.go` files are sent in a single call to the linter. The first issue with that is that, as the linter [Quick Start](https://golangci-lint.run/welcome/quick-start/) guide explicitly states, files must come from the same package. The second issue is that the linter tries to compile each file via `types.Checker` and, unless the source file is self-contained and has no references to things declared in other source files of the codebase, the compilation will fail, even if the references are towards the same package. Such compilation errors are reported by `golangci-lint` and labeled as `typecheck` (which is not a linter) (see [why do you have `typecheck` errors?](https://golangci-lint.run/welcome/faq/#why-do-you-have-typecheck-errors) section of the documentation). The same problem has also been reported in [`golangci-lint oxsecurity#1574`](golangci/golangci-lint#1574) by an user who configured his editor to run the linter on single files. As commented by a core maintainer [here](golangci/golangci-lint#1574 (comment)) `typecheck` is not included in the "fast" linters list and, therefore, cannot be run on single files.
wandering-tales
added a commit
to wandering-tales/megalinter
that referenced
this pull request
Apr 26, 2024
It seems `list_of_files` is not the right choice as default lint mode for the `golangci-lint` linter, for several reasons. In such mode, the changed `.go` files are sent in a single call to the linter. The first issue with that is that, as the linter [Quick Start](https://golangci-lint.run/welcome/quick-start/) guide explicitly states, files must come from the same package. The second issue is that the linter tries to compile each file via `types.Checker` and, unless the source file is self-contained and has no references to things declared in other source files of the codebase, the compilation will fail, even if the references are towards the same package. Such compilation errors are reported by `golangci-lint` and labeled as `typecheck` (which is not a linter) (see [why do you have `typecheck` errors?](https://golangci-lint.run/welcome/faq/#why-do-you-have-typecheck-errors) section of the documentation). The same problem has also been reported in [`golangci-lint oxsecurity#1574`](golangci/golangci-lint#1574) by an user who configured his editor to run the linter on single files. As commented by a core maintainer [here](golangci/golangci-lint#1574 (comment)) `typecheck` is not included in the "fast" linters list and, therefore, cannot be run on single files.
wandering-tales
added a commit
to wandering-tales/megalinter
that referenced
this pull request
Apr 26, 2024
It seems `list_of_files` is not the right choice as default lint mode for the `golangci-lint` linter, for several reasons. In such mode, the changed `.go` files are sent in a single call to the linter. The first issue with that is that, as the linter [Quick Start](https://golangci-lint.run/welcome/quick-start/) guide explicitly states, files must come from the same package. The second issue is that the linter tries to compile each file via `types.Checker` and, unless the source file is self-contained and has no references to things declared in other source files of the codebase, the compilation will fail, even if the references are towards the same package. Such compilation errors are reported by `golangci-lint` and labeled as `typecheck` (which is not a linter) (see [why do you have `typecheck` errors?](https://golangci-lint.run/welcome/faq/#why-do-you-have-typecheck-errors) section of the documentation). The same problem has also been reported in [`golangci-lint oxsecurity#1574`](golangci/golangci-lint#1574) by an user who configured his editor to run the linter on single files. As commented by a core maintainer [here](golangci/golangci-lint#1574 (comment)) `typecheck` is not included in the "fast" linters list and, therefore, cannot be run on single files.
wandering-tales
added a commit
to wandering-tales/megalinter
that referenced
this pull request
Apr 26, 2024
It seems `list_of_files` is not the right choice as default lint mode for the `golangci-lint` linter, for several reasons. In such mode, the changed `.go` files are sent in a single call to the linter. The first issue with that is that, as the linter [Quick Start](https://golangci-lint.run/welcome/quick-start/) guide explicitly states, files must come from the same package. The second issue is that the linter tries to compile each file via `types.Checker` and, unless the source file is self-contained and has no references to things declared in other source files of the codebase, the compilation will fail, even if the references are towards the same package. Such compilation errors are reported by `golangci-lint` and labeled as `typecheck` (which is not a linter) (see [why do you have `typecheck` errors?](https://golangci-lint.run/welcome/faq/#why-do-you-have-typecheck-errors) section of the documentation). The same problem has also been reported in [`golangci-lint oxsecurity#1574`](golangci/golangci-lint#1574) by an user who configured his editor to run the linter on single files. As commented by a core maintainer [here](golangci/golangci-lint#1574 (comment)) `typecheck` is not included in the "fast" linters list and, therefore, cannot be run on single files.
wandering-tales
added a commit
to wandering-tales/megalinter
that referenced
this pull request
Apr 26, 2024
It seems `list_of_files` is not the right choice as default lint mode for the `golangci-lint` linter, for several reasons. In such mode, the changed `.go` files are sent in a single call to the linter. The first issue with that is that, as the linter [Quick Start](https://golangci-lint.run/welcome/quick-start/) guide explicitly states, files must come from the same package. The second issue is that the linter tries to compile each file via `types.Checker` and, unless the source file is self-contained and has no references to things declared in other source files of the codebase, the compilation will fail, even if the references are towards the same package. Such compilation errors are reported by `golangci-lint` and labeled as `typecheck` (which is not a linter) (see [why do you have `typecheck` errors?](https://golangci-lint.run/welcome/faq/#why-do-you-have-typecheck-errors) section of the documentation). The same problem has also been reported in [`golangci-lint oxsecurity#1574`](golangci/golangci-lint#1574) by an user who configured his editor to run the linter on single files. As commented by a core maintainer [here](golangci/golangci-lint#1574 (comment)) `typecheck` is not included in the "fast" linters list and, therefore, cannot be run on single files.
wandering-tales
added a commit
to wandering-tales/megalinter
that referenced
this pull request
Apr 26, 2024
It seems `list_of_files` is not the right choice as default lint mode for the `golangci-lint` linter, for several reasons. In such mode, the changed `.go` files are sent in a single call to the linter. The first issue with that is that, as the linter [Quick Start](https://golangci-lint.run/welcome/quick-start/) guide explicitly states, files must come from the same package. The second issue is that the linter tries to compile each file via `types.Checker` and, unless the source file is self-contained and has no references to things declared in other source files of the codebase, the compilation will fail, even if the references are towards the same package. Such compilation errors are reported by `golangci-lint` and labeled as `typecheck` (which is not a linter) (see [why do you have `typecheck` errors?](https://golangci-lint.run/welcome/faq/#why-do-you-have-typecheck-errors) section of the documentation). The same problem has also been reported in [`golangci-lint oxsecurity#1574`](golangci/golangci-lint#1574) by an user who configured his editor to run the linter on single files. As commented by a core maintainer [here](golangci/golangci-lint#1574 (comment)) `typecheck` is not included in the "fast" linters list and, therefore, cannot be run on single files.
nvuillam
added a commit
that referenced
this pull request
Apr 29, 2024
It seems `list_of_files` is not the right choice as default lint mode for the `golangci-lint` linter, for several reasons. In such mode, the changed `.go` files are sent in a single call to the linter. The first issue with that is that, as the linter [Quick Start](https://golangci-lint.run/welcome/quick-start/) guide explicitly states, files must come from the same package. The second issue is that the linter tries to compile each file via `types.Checker` and, unless the source file is self-contained and has no references to things declared in other source files of the codebase, the compilation will fail, even if the references are towards the same package. Such compilation errors are reported by `golangci-lint` and labeled as `typecheck` (which is not a linter) (see [why do you have `typecheck` errors?](https://golangci-lint.run/welcome/faq/#why-do-you-have-typecheck-errors) section of the documentation). The same problem has also been reported in [`golangci-lint #1574`](golangci/golangci-lint#1574) by an user who configured his editor to run the linter on single files. As commented by a core maintainer [here](golangci/golangci-lint#1574 (comment)) `typecheck` is not included in the "fast" linters list and, therefore, cannot be run on single files. Co-authored-by: Nicolas Vuillamy <nicolas.vuillamy@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #
Proposed Changes
Readiness Checklist
Author/Contributor
Reviewing Maintainer
breaking
if this is a large fundamental changeautomation
,bug
,documentation
,enhancement
,infrastructure
, orperformance