forked from solarlabsteam/cosmos-exporter
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from PFC-developer/v50
V50 - update to use SDKv50
- Loading branch information
Showing
49 changed files
with
11,701 additions
and
538 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,15 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "gomod" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "daily" |
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: golangci-lint | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- 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/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21' | ||
cache: false | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
# Require: The version of golangci-lint to use. | ||
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version. | ||
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit. | ||
version: v1.55 | ||
|
||
# Optional: working directory, useful for monorepos | ||
# working-directory: somedir | ||
|
||
# Optional: golangci-lint command line arguments. | ||
# | ||
# Note: By default, the `.golangci.yml` file should be at the root of the repository. | ||
# The location of the configuration file can be changed by using `--config=` | ||
# args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0 | ||
|
||
# Optional: show only new issues if it's a pull request. The default value is `false`. | ||
# only-new-issues: true | ||
|
||
# Optional: if set to true, then all caching functionality will be completely disabled, | ||
# takes precedence over all other caching options. | ||
# skip-cache: true | ||
|
||
# Optional: if set to true, then the action won't cache or restore ~/go/pkg. | ||
# skip-pkg-cache: true | ||
|
||
# Optional: if set to true, then the action won't cache or restore ~/.cache/go-build. | ||
# skip-build-cache: true | ||
|
||
# Optional: The mode to install golangci-lint. It can be 'binary' or 'goinstall'. | ||
# install-mode: "goinstall" |
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,15 @@ | ||
on: [push, pull_request] | ||
name: Test | ||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
go-version: [1.21.x] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- run: go test ./... |
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,44 +1,124 @@ | ||
run: | ||
tests: true | ||
timeout: 10m | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- exportloopref | ||
- errcheck | ||
- gci | ||
- goconst | ||
- gocritic | ||
- gofumpt | ||
- gosec | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- misspell | ||
- nakedret | ||
- staticcheck | ||
- thelper | ||
- typecheck | ||
- stylecheck | ||
- revive | ||
- typecheck | ||
- tenv | ||
- unconvert | ||
# Prefer unparam over revive's unused param. It is more thorough in its checking. | ||
- unparam | ||
- unused | ||
- misspell | ||
|
||
issues: | ||
exclude-rules: | ||
- text: ST1003 | ||
linters: | ||
- stylecheck | ||
- text: 'differs only by capitalization to method' | ||
linters: | ||
- revive | ||
- text: 'Use of weak random number generator' | ||
linters: | ||
- gosec | ||
- linters: | ||
- staticcheck | ||
text: "SA1019:" # silence errors on usage of deprecated funcs | ||
|
||
max-issues-per-linter: 10000 | ||
max-same-issues: 10000 | ||
|
||
linters-settings: | ||
gocritic: | ||
disabled-checks: | ||
- ifElseChain | ||
gosec: | ||
excludes: | ||
- G402 | ||
- G404 | ||
gci: | ||
sections: | ||
- standard # Standard section: captures all standard packages. | ||
- default # Default section: contains all imports that could not be matched to another section type. | ||
- blank # blank imports | ||
- dot # dot imports | ||
- prefix(cosmossdk.io) | ||
- prefix(github.com/cosmos/cosmos-sdk) | ||
- prefix(github.com/cometbft/cometbft) | ||
- prefix(github.com/cosmos/ibc-go) | ||
- prefix(github.com/pfc-developer/cosmos-exporter) | ||
custom-order: true | ||
revive: | ||
enable-all-rules: true | ||
# Do NOT whine about the following, full explanation found in: | ||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#description-of-available-rules | ||
rules: | ||
- name: var-declaration | ||
- name: use-any | ||
disabled: true | ||
|
||
linters: | ||
enable-all: true | ||
disable: | ||
- prealloc | ||
- lll | ||
- dupl | ||
- funlen | ||
- wsl | ||
- gomnd | ||
- unparam | ||
- goerr113 | ||
- nestif | ||
- errcheck | ||
- golint | ||
- scopelint | ||
- maligned | ||
- interfacer | ||
- wrapcheck | ||
- varnamelen | ||
- tagliatelle | ||
- exhaustivestruct | ||
- gomoddirectives | ||
- ireturn | ||
- nlreturn | ||
- cyclop | ||
- errorlint | ||
- noctx | ||
- gocognit | ||
- gocyclo | ||
- promlinter | ||
- gochecknoglobals | ||
- name: if-return | ||
disabled: true | ||
- name: max-public-structs | ||
disabled: true | ||
- name: cognitive-complexity | ||
disabled: true | ||
- name: argument-limit | ||
disabled: true | ||
- name: cyclomatic | ||
disabled: true | ||
- name: file-header | ||
disabled: true | ||
- name: function-length | ||
disabled: true | ||
- name: function-result-limit | ||
disabled: true | ||
- name: line-length-limit | ||
disabled: true | ||
- name: flag-parameter | ||
disabled: true | ||
- name: add-constant | ||
disabled: true | ||
- name: empty-lines | ||
disabled: true | ||
- name: banned-characters | ||
disabled: true | ||
- name: get-return | ||
disabled: true | ||
- name: deep-exit | ||
disabled: true | ||
- name: confusing-results | ||
disabled: true | ||
- name: unused-parameter | ||
disabled: true | ||
- name: modifies-value-receiver | ||
disabled: true | ||
- name: early-return | ||
disabled: true | ||
- name: confusing-naming | ||
disabled: true | ||
- name: var-naming | ||
disabled: true | ||
- name: defer | ||
disabled: true | ||
# Disabled in favour of unparam. | ||
- name: unused-parameter | ||
disabled: true | ||
- name: unhandled-error | ||
disabled: false | ||
arguments: | ||
- 'fmt.Printf' | ||
- 'fmt.Print' | ||
- 'fmt.Println' | ||
- 'myFunction' |
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,4 +1,4 @@ | ||
FROM golang:1.20-alpine AS builder | ||
FROM golang:1.21-alpine AS builder | ||
|
||
COPY . /app | ||
|
||
|
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.