-
Notifications
You must be signed in to change notification settings - Fork 148
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 #269 from fredbi/chore/update-linting
chore: relint & update
- Loading branch information
Showing
72 changed files
with
2,145 additions
and
1,897 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,50 @@ | ||
name: go test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: stable | ||
check-latest: true | ||
cache: true | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: latest | ||
only-new-issues: true | ||
|
||
test: | ||
name: Unit tests | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
go_version: ['oldstable', 'stable' ] | ||
|
||
steps: | ||
- name: Run unit tests | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '${{ matrix.go_version }}' | ||
check-latest: true | ||
cache: true | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- run: go test -v -race -coverprofile="coverage-${{ matrix.os }}.${{ matrix.go_version }}.out" -covermode=atomic ./... | ||
|
||
- name: Upload coverage to codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
files: './coverage-${{ matrix.os }}.${{ matrix.go_version }}.out' | ||
flags: '${{ matrix.go_version }}' | ||
os: '${{ matrix.os }}' | ||
fail_ci_if_error: false | ||
verbose: true |
This file was deleted.
Oops, something went wrong.
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,62 @@ | ||
linters-settings: | ||
govet: | ||
# Using err repeatedly considered as shadowing. | ||
check-shadowing: false | ||
check-shadowing: true | ||
golint: | ||
min-confidence: 0 | ||
gocyclo: | ||
min-complexity: 30 | ||
min-complexity: 45 | ||
maligned: | ||
suggest-new: true | ||
dupl: | ||
threshold: 100 | ||
threshold: 200 | ||
goconst: | ||
min-len: 2 | ||
min-occurrences: 4 | ||
min-occurrences: 3 | ||
|
||
linters: | ||
enable-all: true | ||
disable: | ||
- nilerr # nilerr crashes on this repo | ||
- maligned | ||
- unparam | ||
- lll | ||
- gochecknoinits | ||
- gochecknoglobals | ||
- funlen | ||
- godox | ||
- gocognit | ||
- whitespace | ||
- wsl | ||
- funlen | ||
- gochecknoglobals | ||
- gochecknoinits | ||
- scopelint | ||
- wrapcheck | ||
- exhaustivestruct | ||
- exhaustive | ||
- nlreturn | ||
- testpackage | ||
- gci | ||
- gofumpt | ||
- goerr113 | ||
- nlreturn | ||
- gomnd | ||
- tparallel | ||
- exhaustivestruct | ||
- goerr113 | ||
- errorlint | ||
- nestif | ||
- godot | ||
- errorlint | ||
- noctx | ||
- gofumpt | ||
- paralleltest | ||
- tparallel | ||
- thelper | ||
- ifshort | ||
- exhaustruct | ||
- varnamelen | ||
- gci | ||
- depguard | ||
- errchkjson | ||
- inamedparam | ||
- nonamedreturns | ||
- musttag | ||
- ireturn | ||
- forcetypeassert | ||
- cyclop | ||
# deprecated linters | ||
- deadcode | ||
- interfacer | ||
- nilerr | ||
- scopelint | ||
- varcheck | ||
- structcheck | ||
- golint | ||
- nosnakecase |
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,7 +1,10 @@ | ||
# runtime [![Build Status](https://travis-ci.org/go-openapi/runtime.svg?branch=client-context)](https://travis-ci.org/go-openapi/runtime) [![codecov](https://codecov.io/gh/go-openapi/runtime/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/runtime) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) | ||
# runtime [![Build Status](https://github.com/go-openapi/runtime/actions/workflows/go-test.yml/badge.svg)](https://github.com/go-openapi/runtime/actions?query=workflow%3A"go+test") [![codecov](https://codecov.io/gh/go-openapi/runtime/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/runtime) | ||
|
||
[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/runtime/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/runtime?status.svg)](http://godoc.org/github.com/go-openapi/runtime) | ||
[![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) | ||
[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/runtime/master/LICENSE) | ||
[![Go Reference](https://pkg.go.dev/badge/github.com/go-openapi/runtime.svg)](https://pkg.go.dev/github.com/go-openapi/runtime) | ||
[![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/runtime)](https://goreportcard.com/report/github.com/go-openapi/runtime) | ||
|
||
# golang Open-API toolkit - runtime | ||
# go OpenAPI toolkit runtime | ||
|
||
The runtime component for use in codegeneration or as untyped usage. | ||
The runtime component for use in code generation or as untyped usage. |
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.