-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'pokt/main' into chore/introduce-submodule
* pokt/main: [P2P] Integrate background router (#732) Update main README.md [Bug] Fix CI linter errors (#885) [Tooling] Block `IN_THIS_*` comments from passing CI (#889)
- Loading branch information
Showing
9 changed files
with
83 additions
and
30 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: golangci-lint | ||
# Copied from https://github.com/golangci/golangci-lint-action | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
# Even though we can test against multiple versions, this one is considered a target version. | ||
TARGET_GOLANG_VERSION: "1.19" | ||
PROTOC_VERSION: "3.19.4" | ||
|
||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ env.TARGET_GOLANG_VERSION }} | ||
cache: false | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v1 | ||
with: | ||
version: ${{ env.PROTOC_VERSION }} | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: install CI dependencies | ||
run: make install_ci_deps | ||
- name: generate protobufs, RPC server, RPC client and mocks | ||
run: make protogen_clean && make protogen_local && make mockgen && make generate_rpc_openapi | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: latest | ||
args: --timeout=10m --build-tags=test | ||
skip-cache: 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//nolint // it's not a Go code file | ||
//go:build !codeanalysis | ||
// +build !codeanalysis | ||
|
||
// This file includes our custom linters. | ||
// If you want to add/modify an existing linter, please check out ruleguard's documentation: https://github.com/quasilyte/go-ruleguard#documentation | ||
|
||
package gorules | ||
|
||
import ( | ||
"github.com/quasilyte/go-ruleguard/dsl" | ||
) | ||
|
||
// Blocks merge if IN_THIS_ comments are present | ||
func BlockInThisCommitPRComment(m dsl.Matcher) { | ||
m.MatchComment(`//.*IN_THIS_.*`). | ||
Where(!m.File().Name.Matches(`Makefile`) && !m.File().Name.Matches(`blockers.go`)). | ||
Report("'IN_THIS_' comments must be addressed before merging to main") | ||
} |
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