Skip to content

Commit

Permalink
Add test cases to improve mutation score indicator (#60)
Browse files Browse the repository at this point in the history
* Minor fixes in ibft and tests (#45)

* Add rapid test with bad proposal coming from byzantine node (#44)

* Implement event generator for rapid testing (#46)

* EVM-220 TestClusterBlockSync/BLS fails in voting power branch (#48)

* Added per round event-based setup in rapid tests (#47)

* Remove redundant changeState (#49)

* Fix  Wrong Round Value in Validation of roundsAndPreparedBlockHashes (#51)

Fix round in roundsAndP reparedBlockHashes

* Audit improvements (#50)

* Audit improvements

* Add unit tests for EventManager to improve MSI

* Add unit tests for message helper to improve MSI

* Byzantine tests (#56)

* Byzantine tests

* Add unit tests for Messages to improve MSI

* Fix lint error

* fix lint errors only for the codes that changed in the PR

* fixed some stuck test

* Revert disabling function-length check in golangci

* Revert "Revert disabling function-length check in golangci"

This reverts commit 415633e.

Co-authored-by: Roman Behma <[email protected]>
Co-authored-by: Igor Crevar <[email protected]>
Co-authored-by: Vuk Gavrilovic <[email protected]>
  • Loading branch information
4 people authored Jan 20, 2023
1 parent da4fb4f commit 428332e
Show file tree
Hide file tree
Showing 15 changed files with 2,171 additions and 548 deletions.
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
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

0 comments on commit 428332e

Please sign in to comment.