@@ -27,13 +27,12 @@ import (
27
27
"github.com/arduino/arduino-check/project"
28
28
"github.com/arduino/arduino-check/result"
29
29
"github.com/arduino/arduino-check/result/feedback"
30
- "github.com/arduino/arduino-check/result/outputformat"
31
30
"github.com/sirupsen/logrus"
32
31
)
33
32
34
33
// RunChecks runs all checks for the given project and outputs the results.
35
34
func RunChecks (project project.Type ) {
36
- fmt .Printf ("Checking %s in %s\n " , project .ProjectType , project .Path )
35
+ feedback .Printf ("Checking %s in %s\n " , project .ProjectType , project .Path )
37
36
38
37
checkdata .Initialize (project , configuration .SchemasPath ())
39
38
@@ -50,23 +49,18 @@ func RunChecks(project project.Type) {
50
49
}
51
50
52
51
// Output will be printed after all checks are finished when configured for "json" output format
53
- if configuration .OutputFormat () == outputformat .Text {
54
- fmt .Printf ("Running check %s: " , checkConfiguration .ID )
55
- }
52
+ feedback .Printf ("Running check %s: " , checkConfiguration .ID )
53
+
56
54
checkResult , checkOutput := checkConfiguration .CheckFunction ()
57
55
reportText := result .Results .Record (project , checkConfiguration , checkResult , checkOutput )
58
- if configuration .OutputFormat () == outputformat .Text {
59
- fmt .Print (reportText )
60
- }
56
+ feedback .Print (reportText )
61
57
}
62
58
63
59
// Checks are finished for this project, so summarize its check results in the report.
64
60
result .Results .AddProjectSummary (project )
65
61
66
- if configuration .OutputFormat () == outputformat .Text {
67
- // Print the project check results summary.
68
- fmt .Print (result .Results .ProjectSummaryText (project ))
69
- }
62
+ // Print the project check results summary.
63
+ feedback .Print (result .Results .ProjectSummaryText (project ))
70
64
}
71
65
72
66
// shouldRun returns whether a given check should be run for the given project under the current tool configuration.
0 commit comments