Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
chore(ci): update linters (#1418)
Browse files Browse the repository at this point in the history
* chore(ci): update linters

* skip md link
  • Loading branch information
fedekunze authored Oct 31, 2022
1 parent fd91448 commit 9181079
Show file tree
Hide file tree
Showing 15 changed files with 136 additions and 64 deletions.
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# CODEOWNERS: https://help.github.com/articles/about-codeowners/

# Primary (global) repo maintainers
* @evmos/core-engineering

* @evmos/core-engineering
15 changes: 14 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: technote-space/[email protected]
with:
PATTERNS: |
**/**.sol
**/**.go
**/**.ts
**/**.js
go.mod
go.sum
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand All @@ -50,11 +59,14 @@ jobs:
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

queries: crypto-com/cosmos-sdk-codeql@main,security-and-quality
if: env.GIT_DIFF
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)

- name: Autobuild
uses: github/codeql-action/autobuild@v2
if: env.GIT_DIFF

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -69,3 +81,4 @@ jobs:

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
if: env.GIT_DIFF
17 changes: 14 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
# Required: setup-go, for all versions v3.0.0+ of golangci-lint
- uses: actions/setup-go@v3
with:
go-version: 1.19
Expand All @@ -23,9 +24,10 @@ jobs:
**/**.go
go.mod
go.sum
- uses: golangci/golangci-lint-action@v3
- uses: golangci/golangci-lint-action@v3.3.0
with:
version: v1.48.0
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.46.2
args: --timeout 10m
github-token: ${{ secrets.github_token }}
# Check only if there are differences in the source code
Expand All @@ -42,7 +44,11 @@ jobs:
docs/**/*.md
x/**/*.md
README.md
- uses: articulate/[email protected]
- uses: nosborn/[email protected]
with:
files: .
config_file: .markdownlint.yml
ignore_path: .markdownlintignore
# Check only if there are differences in the source code
if: env.GIT_DIFF
python-lint:
Expand Down Expand Up @@ -70,7 +76,12 @@ jobs:
- uses: cachix/cachix-action@v12
with:
name: ethermint
- uses: technote-space/[email protected]
with:
PATTERNS: |
**/**.py
- name: run gomod2nix
run: |
nix run -f ./nix gomod2nix
git diff --no-ext-diff --exit-code
if: env.GIT_DIFF
29 changes: 29 additions & 0 deletions .github/workflows/markdown-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Check Markdown links
on:
pull_request:
paths:
- '**.md'
push:
branches:
- main
paths:
- '**.md'

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: technote-space/[email protected]
id: git_diff
with:
PATTERNS: |
**/**.md
- uses: gaurav-nelson/github-action-markdown-link-check@master
with:
folder-path: "docs"
check-modified-files-only: "yes"
use-quiet-mode: "yes"
base-branch: "main"
config-file: "mlc_config.json"
if: env.GIT_DIFF
7 changes: 5 additions & 2 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:

jobs:
Gosec:
permissions:
security-events: write

runs-on: ubuntu-latest
env:
GO111MODULE: on
Expand All @@ -21,10 +24,10 @@ jobs:
go.mod
go.sum
- name: Run Gosec Security Scanner
uses: informalsystems/gosec@master
uses: cosmos/gosec@master
with:
# we let the report trigger content trigger a failure using the GitHub Security features.
args: '-no-fail -fmt sarif -out results.sarif ./...'
args: "-no-fail -fmt sarif -out results.sarif ./..."
if: "env.GIT_DIFF_FILTERED != ''"
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
- uses: technote-space/[email protected]
with:
PATTERNS: |
**/**.sol
**/**.go
go.mod
go.sum
Expand Down
13 changes: 9 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,14 @@ keyring_test_cosmos
./**/node_modules
./**/dist
secret.yml
artifacts/*
tmp-swagger-gen
github.com/
# vue/

# Local docker volume mappings
localnet-setup
.testnets

# Testing
coverage.txt
Expand All @@ -56,6 +60,7 @@ vagrant
# IDE
.idea/
*.iml
*.code-workspace

# Graphviz
dependency-graph.png
Expand All @@ -70,8 +75,8 @@ dependency-graph.png
*.abi

# Node.js
tests/**/node_modules/*
tests-solidity/**/node_modules/*
**/node_modules

# Nix
/result

# OpenZeppelin contracts
contracts/@openzeppelin/*
2 changes: 1 addition & 1 deletion .markdownlintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CHANGELOG.md
docs/protocol/proto-docs.md
docs/api/proto-docs.md
docs/node_modules
12 changes: 6 additions & 6 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ pull_request_rules:
backport:
branches:
- main
- name: backport patches to v0.17.x branch
- name: backport patches to v0.20.x branch
conditions:
- base=main
- label=backport/0.17.x
- label=backport/0.20.x
actions:
backport:
branches:
- release/v0.17.x
- name: backport patches to v0.16.x branch
- release/v0.20.x
- name: backport patches to v0.19.x branch
conditions:
- base=main
- label=backport/0.16.x
- label=backport/0.19.x
actions:
backport:
branches:
- release/v0.16.x
- release/v0.19.x
3 changes: 3 additions & 0 deletions .solhint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "solhint:default"
}
31 changes: 31 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---

yaml-files:
- '*.yaml'
- '*.yml'
- '.yamllint'

rules:
braces: enable
brackets: enable
colons: enable
commas: enable
comments:
level: warning
comments-indentation: disable
document-end: disable
document-start: disable
empty-lines: disable
empty-values: disable
float-values: disable
hyphens: enable
indentation: enable
key-duplicates: enable
key-ordering: disable
line-length: disable
new-line-at-end-of-file: enable
new-lines: enable
octal-values: disable
quoted-strings: disable
trailing-spaces: disable
truthy: disable
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
- [Pull Request Templates](#pull-request-templates)
- [Requesting Reviews](#requesting-reviews)
- [Reviewing Pull Requests](#reviewing-pull-requests)
- [Updating Documentation](#updating-documentation)
- [Forking](#forking)
- [Dependencies](#dependencies)
- [Protobuf](#protobuf)
Expand Down
16 changes: 16 additions & 0 deletions gometalinter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"Linters": {
"vet": "go tool vet -composites=false :PATH:LINE:MESSAGE"
},
"Enable": [
"golint",
"vet",
"ineffassign",
"unparam",
"unconvert",
"misspell"
],
"Deadline": "500s",
"Vendor": true,
"Cyclo": 11
}
5 changes: 5 additions & 0 deletions mlc_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"retryOn429": true,
"retryCount": 3,
"fallbackRetryDelay": "20s"
}
45 changes: 0 additions & 45 deletions starport.yml

This file was deleted.

0 comments on commit 9181079

Please sign in to comment.