swiftlang/swift-package-manager
View on GitHub`containsAtMain` does not handle `@main` on the same line as a multi-line end comment
Open
#9,685 opened on Feb 5, 2026
good first issue
Repository metrics
- Stars
- (10,145 stars)
- PR merge metrics
- (Avg merge 8d 1h) (76 merged PRs in 30d)
Description
The containsAtMain function call does not correctly return true with the following input
/*
This is a multi-line comment
/* @main
struct MyApp {
static func main() {
print("Hello, World!")
}
}
Search for the GitHub issue in the swift-package-manager repository to located an impacted automated test