From 93e4e5bb2ec6a1d6e1f7d04b88c887bc51dde3c5 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Mon, 29 May 2023 10:41:05 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Alessio Perugini --- internal/builder/diagnostics/compiler_detection.go | 4 ++-- internal/builder/diagnostics/parser_test.go | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/builder/diagnostics/compiler_detection.go b/internal/builder/diagnostics/compiler_detection.go index 0c47e88e09d..53b83a52bc1 100644 --- a/internal/builder/diagnostics/compiler_detection.go +++ b/internal/builder/diagnostics/compiler_detection.go @@ -44,7 +44,7 @@ var runProcess = func(args ...string) []string { } // DetectCompilerFromCommandLine tries to detect a compiler from a given command line. -// If probleCompiler is true, the compiler may be executed with different flags to +// If probeCompiler is true, the compiler may be executed with different flags to // infer the version or capabilities. func DetectCompilerFromCommandLine(args []string, probeCompiler bool) *DetectedCompiler { if len(args) == 0 { @@ -61,7 +61,7 @@ func DetectCompilerFromCommandLine(args []string, probeCompiler bool) *DetectedC } if family == "gcc" && probeCompiler { - // Run "gcc --verion" to obtain more info + // Run "gcc --version" to obtain more info res.DetailedVersion = runProcess(args[0], "--version") // Usually on the first line we get the compiler architecture and diff --git a/internal/builder/diagnostics/parser_test.go b/internal/builder/diagnostics/parser_test.go index 605cfbe5787..9663c5f1b67 100644 --- a/internal/builder/diagnostics/parser_test.go +++ b/internal/builder/diagnostics/parser_test.go @@ -52,6 +52,5 @@ func runParserTest(t *testing.T, testFile string) { require.NoError(t, err) golden, err := paths.New("testdata", "compiler_outputs", testFile+".json").ReadFile() require.NoError(t, err) - // fmt.Println(string(output)) require.Equal(t, string(golden), string(output)) }