Skip to content

feat: add open-rpc linter to ci #673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ jobs:
with:
go-version: ^1.18
id: go
- name: Install openrpc-linter
run: go install github.com/shanejonas/openrpc-linter@latest
- name: Run openrpc-linter
run: openrpc-linter lint refs-openrpc.json -r openrpc-lint.yml

- name: Install speccheck
run: go install github.com/lightclient/rpctestgen/cmd/speccheck@latest
- name: Run speccheck
Expand Down
16 changes: 16 additions & 0 deletions openrpc-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
description: "OpenRPC validation rules"
rules:
info-title:
description: "Info must have description. It supports markdown, and usually shows up as the index page of the documentation."
given: "$.info"
severity: "error"
then:
field: "description"
function: "truthy"
method-summary:
description: "Method must have a summary."
given: "$.methods[*]"
severity: "error"
then:
field: "summary"
function: "truthy"
Loading