swiftlang/swift-package-manager

`containsAtMain` does not handle `@main` on the same line as a multi-line end comment

Open

#9,685 opened on 2026年2月5日

GitHub で見る
 (1 comment) (0 reactions) (0 assignees)Swift (1,462 forks)batch import
good first issue

Repository metrics

Stars
 (10,145 stars)
PR merge metrics
 (平均マージ 9d 4h) (30d で 62 merged PRs)

説明

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

コントリビューターガイド