We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2084450 commit 45c23cbCopy full SHA for 45c23cb
Sources/CreateAPI/Generator/Generator+Paths.swift
@@ -135,7 +135,14 @@ extension Generator {
135
136
private func shouldGenerate(path: String) -> Bool {
137
if !options.paths.include.isEmpty {
138
- return options.paths.include.contains(path)
+ return options.paths.include.contains(where: { include in
139
+ switch (include.first, include.last, include) {
140
+ case ("*", "*", _): return include.contains(path.dropFirst().dropLast())
141
+ case ("*", _, _): return path.hasSuffix(include.dropFirst())
142
+ case (_, "*", _): return path.hasPrefix(include.dropLast())
143
+ default: return include == path
144
+ }
145
+ })
146
}
147
if !options.paths.exclude.isEmpty {
148
return !options.paths.exclude.contains(path)
0 commit comments