From d627415e4ad4d73448328d02a2fc8eec554c73eb Mon Sep 17 00:00:00 2001 From: Peter Trifanov Date: Mon, 16 Dec 2024 13:11:00 +0100 Subject: [PATCH] Update gofmt config --- sonar-go-to-slang/build.gradle | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sonar-go-to-slang/build.gradle b/sonar-go-to-slang/build.gradle index cbed406..5d2da89 100644 --- a/sonar-go-to-slang/build.gradle +++ b/sonar-go-to-slang/build.gradle @@ -38,10 +38,17 @@ if (System.getenv("CI") == "true") { // // spotless is enabled only for CI, because spotless relies on Go installation being available on the machine spotless { go { - def goVersion = providers.environmentVariable("GO_VERSION").getOrElse("1.21.8") - gofmt("go$goVersion") + def goVersion = providers.environmentVariable("GO_VERSION").getOrElse("1.23.4") + gofmt("go$goVersion").withGoExecutable(System.getenv("HOME") + "/go/bin/go") target("*.go", "**/*.go") targetExclude("**/*.pb.go") } } + // For now, these tasks rely on installation of Go performed by the call to make.sh + tasks.spotlessCheck { + dependsOn generateParserAndBuild + } + tasks.spotlessApply { + dependsOn generateParserAndBuild + } }