Skip to content

Add linter

Add linter #9

Workflow file for this run

# Write me a workflow that will lint the code with golangci-lint
name: lint
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: true
# Cloning outside of workspace is currently not possible, see https://github.com/actions/checkout/issues/197
# Therefore, we move later
# (we need ../reva available due to a replace in the go.mod file)
- name: Cloning reva
uses: actions/checkout@v4
with:
repository: cs3org/reva
path: reva
- run: mv reva ../reva
- name: Go mod tidy
run: go mod tidy
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
args: --timeout=5m
skip-cache: false