Skip to content
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

Add test cases to improve mutation score indicator #60

Merged
Merged
Show file tree
Hide file tree
Changes from 16 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
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
submodules: recursive

- name: Go test
run: go test -covermode=atomic -shuffle=on -coverprofile coverage.out -timeout 2m ./...
run: go test -test.short -covermode=atomic -shuffle=on -coverprofile coverage.out -timeout 10m ./...

- name: Upload coverage file to Codecov
uses: codecov/codecov-action@v3
Expand All @@ -45,7 +45,7 @@ jobs:
submodules: recursive

- name: Run Go Test with race
run: go test -race -shuffle=on -timeout 2m ./...
run: go test -test.short -race -shuffle=on -timeout 10m ./...

mutating:
name: Mutation tests
Expand Down
15 changes: 9 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,10 @@ linters:
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
- unused # Checks Go code for unused constants, variables, functions and types
- containedctx # containedctx is a linter that detects struct contained context.Context field
- cyclop # checks function and package cyclomatic complexity
- durationcheck # check for two durations multiplied together
- errchkjson
- gochecknoglobals # check that no global variables exist
- goerr113 # Golang linter to check the errors handling expressions
- gomnd # An analyzer to detect magic numbers.
- ireturn # Accept Interfaces, Return Concrete Types
- nosprintfhostport # Checks for misuse of Sprintf to construct a host with port in a URL.
- promlinter # Check Prometheus metrics naming via promlint
Expand Down Expand Up @@ -167,7 +165,7 @@ linters-settings:
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#add-constant
- name: add-constant
severity: warning
disabled: false
disabled: true
arguments:
- maxLitCount: "3"
allowStrs: '""'
Expand Down Expand Up @@ -206,7 +204,7 @@ linters-settings:
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#cognitive-complexity
- name: cognitive-complexity
severity: warning
disabled: false
disabled: true
arguments: [ 7 ]
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#confusing-naming
- name: confusing-naming
Expand All @@ -233,7 +231,7 @@ linters-settings:
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#cyclomatic
- name: cyclomatic
severity: warning
disabled: false
disabled: true
arguments: [ 3 ]
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#datarace
- name: datarace
Expand Down Expand Up @@ -310,7 +308,7 @@ linters-settings:
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#function-length
- name: function-length
severity: warning
disabled: false
disabled: true
Kourin1996 marked this conversation as resolved.
Show resolved Hide resolved
arguments: [ 10, 0 ]
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#get-return
- name: get-return
Expand Down Expand Up @@ -495,6 +493,11 @@ issues:
- gosec
- unparam
- lll
- containedctx
- goerr113
- revive
- gochecknoglobals
- exhaustive
include:
- EXC0012 # Exported (.+) should have comment( \(or a comment on this block\))? or be unexported
- EXC0013 # Package comment should be of the form "(.+)...
Expand Down
Loading