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 11
11
//===----------------------------------------------------------------------===//
12
12
13
13
public enum FileExtension : String {
14
+ case asm
14
15
case c
16
+ case cc
17
+ case cl
15
18
case cpp
16
19
case def
17
20
case gyb
18
21
case h
22
+ case inc
19
23
case m
20
24
case md
21
25
case mm
22
26
case modulemap
23
27
case o
28
+ case proto
24
29
case rst
30
+ case s
25
31
case swift
26
32
case swiftmodule
27
33
case td
Original file line number Diff line number Diff line change @@ -74,8 +74,10 @@ public extension PathProtocol {
74
74
func hasExtension( _ exts: FileExtension ... ) -> Bool {
75
75
// Note that querying `.extension` involves re-parsing, so only do it
76
76
// 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
+ } )
79
81
}
80
82
81
83
func starts( with other: Self ) -> Bool {
You can’t perform that action at this time.
0 commit comments