Skip to content

Commit

Permalink
Merge pull request #100 from souleb/add-linter-action
Browse files Browse the repository at this point in the history
adding a linter
  • Loading branch information
stefanprodan authored Sep 10, 2021
2 parents 8339630 + ec2846b commit 6d3c0f6
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: lint

on:
workflow_dispatch:
push:
branches-ignore:
# Do not push events to branches matching refs/heads/main
- 'main'
tags-ignore: [ '*' ]

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v2

- name: Run Revive Action
uses: docker://morphy/revive-action:v2
with:
# Path to your Revive config within the repo (optional)
config: revive/config.toml



34 changes: 34 additions & 0 deletions revive/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
ignoreGeneratedHeader = false
severity = "warning"
confidence = 0.8
errorCode = 0
warningCode = 0

[rule.blank-imports]
[rule.context-as-argument]
[rule.context-keys-type]
[rule.dot-imports]
[rule.error-return]
[rule.error-strings]
[rule.error-naming]
[rule.exported]
[rule.function-length]
arguments = [40,60]
[rule.function-result-limit]
arguments = [3]
[rule.if-return]
[rule.increment-decrement]
[rule.var-naming]
[rule.var-declaration]
[rule.package-comments]
[rule.range]
[rule.receiver-naming]
[rule.time-naming]
[rule.unexported-return]
[rule.indent-error-flow]
[rule.errorf]
[rule.empty-block]
[rule.superfluous-else]
[rule.unused-parameter]
[rule.unreachable-code]
[rule.redefines-builtin-id]

0 comments on commit 6d3c0f6

Please sign in to comment.