From 0b1c02c17e9b25ce75821159331cb43804d89c44 Mon Sep 17 00:00:00 2001 From: Samir Faci Date: Thu, 28 Sep 2023 11:14:44 -0400 Subject: [PATCH] Adding GoLang Linter --- .github/workflows/golangci-lint.yml | 30 ++++++++++++++++++++++++++++ test/connections_integration_test.go | 1 + 2 files changed, 31 insertions(+) create mode 100644 .github/workflows/golangci-lint.yml diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml new file mode 100644 index 00000000..f00065ce --- /dev/null +++ b/.github/workflows/golangci-lint.yml @@ -0,0 +1,30 @@ +name: golangci-lint +on: + push: + branches: + - master + pull_request: + + +permissions: + contents: read + # Optional: allow read access to pull request. Use with `only-new-issues` option. + # pull-requests: read + +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: '1.21' + cache: false + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + # Require: The version of golangci-lint to use. + # When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version. + # When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit. + version: v1.54 diff --git a/test/connections_integration_test.go b/test/connections_integration_test.go index 28376fd0..b1f05c17 100644 --- a/test/connections_integration_test.go +++ b/test/connections_integration_test.go @@ -62,6 +62,7 @@ func TestDataSourceFilter(t *testing.T) { }, } testingContext = config.Config().GetAppConfig().GetContexts()["testing"] + _ = testingContext apiClient := service.NewApiService("dummy")