From b9e7ca580a39eb82a8d55a7ba2bb770003bbf5ac Mon Sep 17 00:00:00 2001 From: kevin Date: Sat, 30 Oct 2021 19:26:44 +0800 Subject: [PATCH] ci: add golangci --- .github/workflows/golangci-lint.yml | 21 +++++++++++++++++++++ .gitignore | 8 ++++---- .golangci.yaml | 21 --------------------- 3 files changed, 25 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/golangci-lint.yml delete mode 100644 .golangci.yaml diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml new file mode 100644 index 0000000..6b4a093 --- /dev/null +++ b/.github/workflows/golangci-lint.yml @@ -0,0 +1,21 @@ +name: golangci-lint +on: + push: + tags: + - v* + branches: + - master + - main + 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@v2 + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 \ No newline at end of file diff --git a/.gitignore b/.gitignore index d887e52..77b92e0 100644 --- a/.gitignore +++ b/.gitignore @@ -24,7 +24,7 @@ # corpus files data -**/*.corpus.json -**/*.yml -**/*.gob -**/stopwords.txt +cli/**/*.yml +cli/**/*.corpus.json +cli/**/*.gob +cli/**/stopwords.txt diff --git a/.golangci.yaml b/.golangci.yaml deleted file mode 100644 index 4460460..0000000 --- a/.golangci.yaml +++ /dev/null @@ -1,21 +0,0 @@ -run: - skip-dirs: - - .*~ - - data - skip-files: - - ".*.my.go$" - - _test.go -linters-settings: - errcheck: - check-type-assertions: true - check-blank: false - lll: - line-length: 240 - godox: - keywords: - - BUG - - FIXME - - OPTIMIZE - - HACK -linters: - enable-all: true