Compare commits

..

3 Commits

Author SHA1 Message Date
2c045b8494
feat(resultdetail): show executor status by default
Some checks failed
submodules sync / sync (push) Failing after 2s
build / build (push) Successful in 1m29s
build / trigger-build-image (push) Successful in 10s
2024-10-22 06:59:56 -04:00
469678e999
chore: remove old name healthcheck 2024-10-22 06:58:48 -04:00
35f0f5c829
fix(healthcheck/asciifile): file with attribute set as text 2024-10-22 06:58:23 -04:00
3 changed files with 12 additions and 9 deletions

View File

@ -12,7 +12,6 @@ all: build
build: build:
$(foreach APP,$(APPS), go build -ldflags=$(FLAGS) -o $(BUILD_DIR)/$(APP) ./cmd/$(APP);) $(foreach APP,$(APPS), go build -ldflags=$(FLAGS) -o $(BUILD_DIR)/$(APP) ./cmd/$(APP);)
cp ./build/repo-health-checker ./build/healthcheck
clean: clean:
rm -rf $(BUILD_DIR)/* rm -rf $(BUILD_DIR)/*

View File

@ -7,13 +7,14 @@ import (
) )
type Conf struct { type Conf struct {
Score int Score int
ShowExitStatus bool `default:"false"` ShowExecutorStatus bool `default:"true"`
ShowError bool `default:"false"` ShowExitStatus bool `default:"false"`
ShowTime bool `default:"true"` ShowError bool `default:"false"`
ShowMemory bool `default:"true"` ShowTime bool `default:"true"`
ShowRunTime bool `default:"false"` ShowMemory bool `default:"true"`
ShowFiles []string ShowRunTime bool `default:"false"`
ShowFiles []string
} }
type ResultDetail struct{} type ResultDetail struct{}
@ -29,6 +30,9 @@ func (*ResultDetail) Run(results []stage.ExecutorResult, confAny any) (
var res []stage.ParserResult var res []stage.ParserResult
for _, result := range results { for _, result := range results {
comment := "" comment := ""
if conf.ShowExecutorStatus {
comment += fmt.Sprintf("Executor Status: `%s`\n", result.Status.String())
}
if conf.ShowExitStatus { if conf.ShowExitStatus {
comment += fmt.Sprintf("Exit Status: `%d`\n", result.ExitStatus) comment += fmt.Sprintf("Exit Status: `%d`\n", result.ExitStatus)
} }

View File

@ -56,7 +56,7 @@ func getNonAscii(root string) ([]string, error) {
return err return err
} }
ret, matched := matcher.Match(strings.Split(relPath, "/"), nil) ret, matched := matcher.Match(strings.Split(relPath, "/"), nil)
if matched && ret["text"].IsUnset() { if matched && ret["text"].IsUnset() && !ret["text"].IsSet() {
return nil return nil
} }
} }