Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Code analysis tool #313

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -34,6 +34,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