Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7b2130c

Browse files
committed
Set exit status according to check results
1 parent f52415e commit 7b2130c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

‎main.go‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,7 @@ func main() {
4040
fmt.Println(result.JSONReport())
4141
}
4242

43-
// TODO: set exit status according to check results
43+
if !result.Passed() {
44+
os.Exit(errorcodes.ErrGeneric)
45+
}
4446
}

‎result/result.go‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,11 @@ func jsonReportRaw() []byte {
207207
return reportJSON
208208
}
209209

210+
// Passed returns whether the checks passed cumulatively.
211+
func Passed() bool {
212+
return report.Summary.Pass
213+
}
214+
210215
func getProjectReportIndex(projectPath *paths.Path) (bool, int) {
211216
var index int
212217
var projectReport projectReportType

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /