MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / extractFindPaths

Function extractFindPaths

tools/bash/validation.go:168–190  ·  view source on GitHub ↗
(tokens []string)

Source from the content-addressed store, hash-verified

166}
167
168func extractFindPaths(tokens []string) []string {
169 paths := []string{}
170
171 for _, t := range tokens {
172 if t == "--" {
173 continue
174 }
175
176 if strings.HasPrefix(t, "-") && t != "-print" && t != "-print0" {
177 if _, err := strconv.ParseFloat(t, 64); err == nil {
178 paths = append(paths, t)
179 continue
180 }
181 break
182 }
183
184 if !strings.HasPrefix(t, "-") {
185 paths = append(paths, t)
186 }
187 }
188
189 return paths
190}
191
192func extractGrepPaths(tokens []string) []string {
193 paths := []string{}

Callers 1

ExtractPathsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected