-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: add markdownlint and resolve errors * fix: add and resolve errors for go vet and yamllint * fix: add and resolve errors for golangci * feat: add additional Makefile commands * feat(ci): add lint ci * chore: fix mispelled name * chore: clean up punctuation * feat(ci): add govulncheck to make lint and lint ci * chore: define constant for file perms
- Loading branch information
Showing
36 changed files
with
280 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
KNUU_TIMEOUT=60m # The timeout for the tests | ||
# NOTE: this file should only contain generic environment variables as it is | ||
# currently part of the git history. | ||
|
||
KNUU_TIMEOUT=60m # The timeout for the tests | ||
KNUU_BUILDER=docker # The builder to use for building images. docker or kubernetes | ||
LOG_LEVEL=info # The debug level. debug, info, warn, error | ||
LOG_LEVEL=info # The debug level. debug, info, warn, error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Lint | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
workflow_dispatch: | ||
merge_group: | ||
|
||
jobs: | ||
golangci-lint: | ||
name: golangci-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.22.1 | ||
# This steps sets the GIT_DIFF environment variable to true | ||
# if files defined in PATTERS changed | ||
- uses: technote-space/[email protected] | ||
with: | ||
# This job will pass without running if go.mod, go.sum, and *.go | ||
# wasn't modified. | ||
PATTERNS: | | ||
**/**.go | ||
go.mod | ||
go.sum | ||
- uses: golangci/[email protected] | ||
with: | ||
version: latest | ||
args: --timeout 10m | ||
github-token: ${{ secrets.github_token }} | ||
if: env.GIT_DIFF | ||
|
||
yamllint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: celestiaorg/.github/.github/actions/[email protected] | ||
|
||
markdown-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: celestiaorg/.github/.github/actions/[email protected] | ||
|
||
govulncheck: | ||
runs-on: ubuntu-latest | ||
name: Run govulncheck | ||
steps: | ||
- id: govulncheck | ||
uses: golang/govulncheck-action@v1 | ||
with: | ||
go-version-input: 1.22.1 | ||
go-package: ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
coverage.txt | ||
.vscode/launch.json | ||
*/**.html | ||
*.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
run: | ||
timeout: 5m | ||
modules-download-mode: readonly | ||
|
||
linters: | ||
disable: | ||
# TODO: there are tons of errors for these, we need to handle in a separate PR | ||
- errorlint | ||
- errcheck | ||
- gosec | ||
enable: | ||
- gofmt | ||
- goimports | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- misspell | ||
- revive | ||
- staticcheck | ||
- typecheck | ||
- unconvert | ||
- unused | ||
|
||
issues: | ||
exclude-use-default: false | ||
include: | ||
- EXC0012 # EXC0012 revive: Annoying issue about not having a comment. The rare codebase has such comments | ||
- EXC0014 # EXC0014 revive: Annoying issue about not having a comment. The rare codebase has such comments | ||
exclude: | ||
- SA1019 # TODO enable: SA 1019 staticcheck: this is being triggered by the refactor and all the deprecated code. We need to enable this once we make the breaking change official | ||
|
||
linters-settings: | ||
revive: | ||
rules: | ||
- name: package-comments | ||
disabled: true | ||
- name: duplicated-imports | ||
severity: warning | ||
- name: exported | ||
disabled: true | ||
# Leaving for reference if we can enable in the future. | ||
# arguments: | ||
# - disableStutteringCheck | ||
|
||
goimports: | ||
local-prefixes: github.com/celestiaorg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
default: true | ||
MD010: false | ||
MD013: false | ||
MD041: false | ||
MD024: | ||
allow_different_nesting: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
# Built from docs https://yamllint.readthedocs.io/en/stable/configuration.html | ||
extends: default | ||
|
||
rules: | ||
# 120 chars should be enough, but don't fail if a line is longer | ||
line-length: | ||
max: 120 | ||
level: warning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.