Skip to content

Commit

Permalink
[FEATURE] Code analysis tool (#313)
Browse files Browse the repository at this point in the history
* add code analysis tool

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* increased timeout

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* add only-new-issues paramter

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

---------

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>
  • Loading branch information
zethuman authored May 30, 2023
1 parent 7927658 commit 602fa25
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ jobs:
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 1 }
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with: { go-version: '1.x' }
- name: Install dependencies
run: go install golang.org/x/lint/golint@latest
env:
GOBIN: ${{ env.GOROOT }}/bin
shell: bash
- run: go version
- run: make lint
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
args: -v -c .golangci.yml
only-new-issues: true

prettify:
name: Prettify
Expand Down
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
run:
# Timeout for analysis, e.g. 30s, 5m.
# Default: 1m
timeout: 20m
modules-download-mode: readonly
issues-exit-code: 0

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Adds testcases to check UpdateByQuery functionality ([#304](https://github.com/opensearch-project/opensearch-go/pull/304))
- Adds additional timeout after cluster start ([#303](https://github.com/opensearch-project/opensearch-go/pull/303))
- Adds docker healthcheck to auto restart the container ([#315](https://github.com/opensearch-project/opensearch-go/pull/315))
- Adds golangci-lint as code analysis tool ([#313](https://github.com/opensearch-project/opensearch-go/pull/313))

### Changed

Expand Down

0 comments on commit 602fa25

Please # to comment.