File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
utils/swift-xcodegen/Sources/SwiftXcodeGen/Path Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1111//===----------------------------------------------------------------------===//
1212
1313public enum FileExtension : String {
14+ case asm
1415 case c
16+ case cc
17+ case cl
1518 case cpp
1619 case def
1720 case gyb
1821 case h
22+ case inc
1923 case m
2024 case md
2125 case mm
2226 case modulemap
2327 case o
28+ case proto
2429 case rst
30+ case s
2531 case swift
2632 case swiftmodule
2733 case td
Original file line number Diff line number Diff line change @@ -74,8 +74,10 @@ public extension PathProtocol {
7474 func hasExtension( _ exts: FileExtension ... ) -> Bool {
7575 // Note that querying `.extension` involves re-parsing, so only do it
7676 // once here.
77- let ext = storage. extension
78- return exts. contains ( where: { ext == $0. rawValue } )
77+ guard let ext = storage. extension else { return false }
78+ return exts. contains ( where: {
79+ ext. compare ( $0. rawValue, options: . caseInsensitive) == . orderedSame
80+ } )
7981 }
8082
8183 func starts( with other: Self ) -> Bool {
You can’t perform that action at this time.
0 commit comments