Add wsl linter and fix

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-05-19 14:51:08 +04:00
parent eedfdcecc8
commit 9156d6a16a
882 changed files with 6068 additions and 574 deletions

View File

@@ -33,9 +33,11 @@ func main() {
if isNonInteractiveEnv() {
ios.ForceNonInteractive = true
}
if isNoColorEnv() {
ios.ForceNoColor = true
}
ios.ApplyColorProfile()
f := &cmdutil.Factory{
@@ -58,15 +60,19 @@ func isNonInteractiveEnv() bool {
if v := os.Getenv("PROBO_NO_INTERACTIVE"); v == "1" || v == "true" {
return true
}
if v := os.Getenv("CI"); v == "true" || v == "1" {
return true
}
if os.Getenv("DEBIAN_FRONTEND") == "noninteractive" {
return true
}
if os.Getenv("TERM") == "dumb" {
return true
}
return false
}
@@ -74,8 +80,10 @@ func isNoColorEnv() bool {
if _, ok := os.LookupEnv("NO_COLOR"); ok {
return true
}
if os.Getenv("TERM") == "dumb" {
return true
}
return false
}