From 0b91b235cd0b53e0374b983467f3b093e2fbb6c2 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 | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sonar-go-to-slang/build.gradle b/sonar-go-to-slang/build.gradle index cbed4066..5da8218e 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") + targetExclude("*_generated.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 + } }