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

[RFE] Add golang linter in CI #17

Closed
mqasimsarfraz opened this issue Feb 23, 2023 · 1 comment · Fixed by #38
Closed

[RFE] Add golang linter in CI #17

mqasimsarfraz opened this issue Feb 23, 2023 · 1 comment · Fixed by #38
Labels
ci Continuous Integration good first issue Good for newcomers
Milestone

Comments

@mqasimsarfraz
Copy link
Member

As mentioned in the comment we should add golang linter to this repository:

Possible Implementation

We can use golangci-lint-action and have a workflow:

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/setup-go@v3
        with:
          go-version: '1.17'
      - uses: actions/checkout@v3
      - name: golangci-lint
        uses: golangci/golangci-lint-action@v3
        with:
          # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
          version: v1.29

          # Optional: working directory, useful for monorepos
          # working-directory: somedir

          # Optional: golangci-lint command line arguments.
          # args: --issues-exit-code=0

          # Optional: show only new issues if it's a pull request. The default value is `false`.
          # only-new-issues: true

          # Optional: if set to true then the all caching functionality will be complete disabled,
          #           takes precedence over all other caching options.
          # skip-cache: true

          # Optional: if set to true then the action don't cache or restore ~/go/pkg.
          # skip-pkg-cache: true

          # Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
          # skip-build-cache: true
``
@mqasimsarfraz mqasimsarfraz added good first issue Good for newcomers ci Continuous Integration labels Feb 23, 2023
@blanquicet blanquicet added this to the v0.1.1 milestone Apr 5, 2023
@blanquicet
Copy link
Member

We can also get inspiration from other projects, one example here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continuous Integration good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants