swiftlang/swift-package-manager

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

Open

#9.685 geöffnet am 5. Feb. 2026

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Swift (1.462 Forks)batch import
good first issue

Repository-Metriken

Stars
 (10.145 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 9T 13h) (90 gemergte PRs in 30 T)

Beschreibung

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

Contributor Guide