From 4f256b33930f64aec75061701ca9372343432a0e Mon Sep 17 00:00:00 2001 From: Max Kuznetsov Date: Thu, 24 Aug 2023 11:44:21 -0400 Subject: [PATCH] Add GH lint workflow --- .github/workflows/golangci-lint.yml | 25 +++++++++++++++++++++++++ .golangci.yml | 15 +++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/golangci-lint.yml create mode 100644 .golangci.yml diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml new file mode 100644 index 0000000..0c8f70e --- /dev/null +++ b/.github/workflows/golangci-lint.yml @@ -0,0 +1,25 @@ +name: golangci-lint +on: + workflow_dispatch: + pull_request: + +permissions: + contents: read + pull-requests: read + +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: "stable" + cache: false + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.54 + only-new-issues: true + args: --timeout=10m diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..ddc25ff --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,15 @@ +run: + # Enables skipping of directories: + # - vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ + skip-dirs-use-default: true + skip-dirs: + - internal/gopher-lua + - internal/cronexpr + +linters: + enable: + - gofmt + +linters-settings: + gofmt: + simplify: false