Skip to content

Commit

Permalink
linters
Browse files Browse the repository at this point in the history
  • Loading branch information
orsinium committed Aug 31, 2023
1 parent c99a297 commit 2e9b4ef
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .github/workflows/deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# https://github.com/actions/go-dependency-submission
name: dependency-submission
on:
push:
branches:
- master

permissions:
contents: write

jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.18"
- uses: actions/go-dependency-submission@v1
with:
go-mod-path: go.mod
49 changes: 49 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: main

on:
push:
branches:
- master
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version:
- "1.18"
- "1.19"
- "1.20"
- "1.21"
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v3
- run: go test -v ./...

golangci-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.18
- uses: actions/checkout@v3
- uses: golangci/golangci-lint-action@v3

markdownlint-cli:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: nosborn/[email protected]
with:
files: .
config_file: .markdownlint.yaml
dot: true
21 changes: 21 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
linters:
disable:
- dupword
- depguard
- godot
- godox
- errorlint
presets:
- bugs
- comment
- complexity
# - error
- format
- import
# - metalinter
# - module
- performance
# - sql
# - style
# - test
- unused
18 changes: 18 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml
default: true # enable all by default
MD007: # unordered list indentation
indent: 2
MD013: false # do not validate line length
MD014: false # allow $ before command output
MD029: # ordered list prefix, use all ones
style: "one"
MD033: # allow html tags
allowed_elements:
- b
- div
- h1
- img
- p
- picture
- source
MD041: false # the first line in readme is not a MD header
2 changes: 1 addition & 1 deletion arguard/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func (c *Config) flagSet() *flag.FlagSet {
fs := flag.NewFlagSet("contracts", flag.ExitOnError)
fs.BoolVar(
&c.ReportErrors, "report-errors", c.ReportErrors,
"show errors occuring during contract execution",
"show errors occurring during contract execution",
)
return fs
}

0 comments on commit 2e9b4ef

Please sign in to comment.