MCPcopy
hub / github.com/air-verse/air / isIncludeExt

Method isIncludeExt

runner/util.go:175–187  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

173}
174
175func (e *Engine) isIncludeExt(path string) bool {
176 ext := filepath.Ext(path)
177 for _, v := range e.config.Build.IncludeExt {
178 if strings.TrimSpace(v) == extWildcard {
179 // Wildcard matches all files, but exclude the binary file
180 return !e.isBinPath(path)
181 }
182 if ext == "."+strings.TrimSpace(v) {
183 return true
184 }
185 }
186 return false
187}
188
189// isBinPath checks if the given path is the binary file path
190func (e *Engine) isBinPath(path string) bool {

Callers 6

cacheFileChecksumsMethod · 0.95
watchPathMethod · 0.95
startMethod · 0.95
TestIsIncludeExtFunction · 0.95
TestIsIncludeExtWildcardFunction · 0.95

Calls 1

isBinPathMethod · 0.95

Tested by 3

TestIsIncludeExtFunction · 0.76
TestIsIncludeExtWildcardFunction · 0.76