Skip to content

Commit 5421e9f

Browse files
committed
Move project summary report output out of check.RunChecks()
It's better for this function to be exclusively for the running of checks. It is more sensible for the project related output to be handled at a higher level.
1 parent f636b76 commit 5421e9f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

check/check.go

-6
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,6 @@ func RunChecks(project project.Type) {
5858
feedback.Println(reportText)
5959
}
6060
}
61-
62-
// Checks are finished for this project, so summarize its check results in the report.
63-
result.Results.AddProjectSummary(project)
64-
65-
// Print the project check results summary.
66-
feedback.Printf("\n%s\n", result.Results.ProjectSummaryText(project))
6761
}
6862

6963
// shouldRun returns whether a given check should be run for the given project under the current tool configuration.

command/command.go

+6
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ func ArduinoCheck(rootCommand *cobra.Command, cliArguments []string) {
6767

6868
for _, project := range projects {
6969
check.RunChecks(project)
70+
71+
// Checks are finished for this project, so summarize its check results in the report.
72+
result.Results.AddProjectSummary(project)
73+
74+
// Print the project check results summary.
75+
feedback.Printf("\n%s\n", result.Results.ProjectSummaryText(project))
7076
}
7177

7278
// All projects have been checked, so summarize their check results in the report.

0 commit comments

Comments
 (0)