Skip to content

Commit

Permalink
streampay updates & optimizations (#12)
Browse files Browse the repository at this point in the history
* feat(x/streampay): creating stream payment with module account

* removed spm

* add swagger doc generation script

* add type validations

* add streampay events

* feat: x/streampay validations

* refactor(x/streampay): optimize stream payments process

* feat(x/streampay): genesis validation

* fix (streampay/cli): fix missing query

* feat (x/streampay): add stop stream msg

* remove unused files

* add genesis validations and tests

* remove redundant code

* gofumpted

* add lint

* fix (lint): fix lint issues
  • Loading branch information
harish551 authored May 4, 2023
1 parent 609aba0 commit b0eaf0a
Show file tree
Hide file tree
Showing 56 changed files with 100,963 additions and 17,673 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: golangci-lint
on:
push:
tags:
- v*
branches:
- main
pull_request:
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: actions/[email protected]
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
args: --timeout 5m0s
80 changes: 80 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
run:
tests: true
timeout: 10m
sort-results: true
allow-parallel-runners: true

linters:
disable-all: true
enable:
- depguard
- dogsled
- exportloopref
- goconst
- gocritic
- gofumpt
- gosec
- gosimple
- govet
- ineffassign
- misspell
- nakedret
- nolintlint
- staticcheck
- revive
- stylecheck
- typecheck
- thelper
- unconvert
- unused

issues:
gofumpt:
# Module path which contains the source code being formatted.
# Default: ""
module-path: github.com/cosmos/interchain-security
# Choose whether to use the extra rules.
# Default: false
extra-rules: true
exclude-rules:
- text: "Use of weak random number generator"
linters:
- gosec
- text: "ST1003:"
linters:
- stylecheck
# FIXME: Disabled until golangci-lint updates stylecheck with this fix:
# https://github.com/dominikh/go-tools/issues/389
- text: "ST1016:"
linters:
- stylecheck
- path: "migrations"
text: "SA1019:"
linters:
- staticcheck
- text: "leading space"
linters:
- nolintlint

max-issues-per-linter: 10000
max-same-issues: 10000

linters-settings:
gocritic:
disabled-checks:
- appendAssign
- ifElseChain
dogsled:
max-blank-identifiers: 3
revive:
rules:
- name: var-naming
disabled: true
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true
nolintlint:
allow-unused: false
allow-leading-space: true
require-explanation: false
require-specific: false
Loading

0 comments on commit b0eaf0a

Please sign in to comment.