(data []byte)
| 290 | } |
| 291 | |
| 292 | func parseGitignorePatterns(data []byte) GitignorePatterns { |
| 293 | var patterns GitignorePatterns |
| 294 | for line := range strings.SplitSeq(string(data), "\n") { |
| 295 | line = strings.TrimSpace(line) |
| 296 | if line == "" || strings.HasPrefix(line, "#") { |
| 297 | continue |
| 298 | } |
| 299 | patterns = append(patterns, line) |
| 300 | } |
| 301 | return patterns |
| 302 | } |
| 303 | |
| 304 | // isPathExcluded returns true when the given relative file path should be skipped |
| 305 | // based on hardcoded dir rules or .gitignore patterns. |
no outgoing calls
no test coverage detected