Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions format/glob.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package format

import (
"fmt"
"strings"

"github.com/gobwas/glob"
)
Expand All @@ -23,6 +24,8 @@ func compileGlobs(patterns []string) ([]glob.Glob, error) {
}

func pathMatches(path string, globs []glob.Glob) bool {
path = strings.ReplaceAll(path, "\\", "/")
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should i use filepath.ToSlash(path) instead?

Copy link
Copy Markdown
Member

@brianmcgee brianmcgee Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think this is the better approach.


for idx := range globs {
if globs[idx].Match(path) {
return true
Expand Down