Skip to content

Commit

Permalink
Add Markdown linter & go vet GitHub actions and fix lint issues detec…
Browse files Browse the repository at this point in the history
…ted by it (#453)
  • Loading branch information
amitlicht authored Jul 15, 2024
1 parent 36e2eb0 commit 19ec34a
Show file tree
Hide file tree
Showing 6 changed files with 232 additions and 167 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/golangci-lint.yml → .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,24 @@ permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read

jobs:
golangci:
name: lint
name: golangci
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Upgraded Go version? Make sure to upgrade it in the GitHub Actions setup, the Dockerfile and the go.mod as well, so the linter and tests run the same version.
- uses: actions/setup-go@v3
with:
go-version: 1.21
- uses: actions/checkout@v3

- name: go vet
run: go vet ./...
working-directory: src

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
Expand All @@ -44,4 +52,18 @@ jobs:
# skip-pkg-cache: true

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

markdownlint:
name: Check for Markdown errors
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

# Tip: run the markdown lint action locally with '--fix' to automatically fix some of the issues:
# docker run -v $PWD:/workdir ghcr.io/igorshubovych/markdownlint-cli:latest "**/*.md" --fix
- uses: articulate/actions-markdownlint@v1
with:
config: .markdownlint.json
files: '**/*.md'
5 changes: 5 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"default": true,
"MD013": false,
"MD033": false
}
6 changes: 3 additions & 3 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
reported by contacting the project team at <[email protected]>. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Expand All @@ -68,9 +68,9 @@ members of the project's leadership.
## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
<https://www.contributor-covenant.org/faq>
Loading

0 comments on commit 19ec34a

Please sign in to comment.