Glob-based include/exclude configuration
Author: silverwindCreated Dec 9, 2024Updated Jul 29, 2026
Labelsfeature-requestv2
Air currently supports 6 config options to include/exclude files:
include_ext = ["go", "tpl", "tmpl", "html"]
exclude_dir = ["assets", "tmp", "vendor", "frontend/node_modules"]
include_dir = []
include_file = []
exclude_file = []
exclude_regex = ["_test\\.go"]I think from a user perspective, these options are hard to understand and I suggest to support a glob-based configuration with include and exclude options. exclude should take precedence. Above could be rewritten as:
include = [
"**/*.{go,tpl,tmpl,html}",
]
exclude = [
"./{assets,tmp,vendor}",
"./frontend/node_modules",
"**/*_test.go",
]Source: air-verse/air