(init templates): (go example causes an error using go tools) #33554
Labels
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
jsii
This issue originates in jsii, or this feature must be implemented in jsii.
p2
package/tools
Related to AWS CDK Tools or CLI
Describe the bug
The project contains examples of AWS CDK projects inside
node_modules/aws-cdk/lib/init-templates
, including an example for a Go project. This setup causes Go tools to incorrectly scan these files, leading to failures. Specifically, golangci-lint encounters a compile error and cannot generate expected warnings and errors.There is an open discussion about this topic in Go's repository.
golang/go#42965
Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
Do not include go code that can interfere with a Go project.
Current Behavior
Reproduction Steps
Create a new project using Go
Include a Golagci-lint config file
Install
aws-cdk
via npmExecute
$ golangci-lint run
Possible Solution
One solution would be to rename the directory from
init-templates
to_init-templates
Additional Information/Context
No response
CDK CLI Version
2.1000.2
Framework Version
No response
Node.js Version
v20.11.1
OS
MacOS Sequoia v15.3
Language
Go
Language Version
go version go1.22.3 darwin/arm64
Other information
No response
The text was updated successfully, but these errors were encountered: