Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
37 changes: 37 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
run:
timeout: 5m
tests: false

linters:
enable:
- golint
- misspell
- govet

disable:
- deadcode
- errcheck
- gosimple
- ineffassign
- staticcheck
- structcheck
- unused
- varcheck

linters-settings:
# govet:
# check-shadowing: true

issues:
# don't use default exclude rules listed in `golangci-lint run --help`
exclude-use-default: false

exclude-rules:
# ignore govet false positive fixed in https://github.com/golang/go/issues/45043
- linters:
- govet
text: "sigchanyzer: misuse of unbuffered os.Signal channel as argument to signal.Notify"
# ignore golint false positive fixed in https://github.com/golang/lint/pull/487
- linters:
- golint
text: "exported method (.*).Unwrap` should have comment or be unexported"
4 changes: 2 additions & 2 deletions ledger/txtail.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ func (t *txTail) loadFromDisk(l ledgerForTracker) error {

t.recent = make(map[basics.Round]roundTxMembers)

// the roundsLastValids is a temporary map used during the exection of
// the roundsLastValids is a temporary map used during the execution of
// loadFromDisk, allowing us to construct the lastValid maps in their
// optimal size. This would ensure that upon startup, we don't preallocate
// more memory than we truely need.
// more memory than we truly need.
roundsLastValids := make(map[basics.Round][]transactions.Txid)

for ; old <= latest; old++ {
Expand Down
2 changes: 1 addition & 1 deletion node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ func (node *AlgorandFullNode) writeDevmodeBlock() (err error) {

// BroadcastSignedTxGroup broadcasts a transaction group that has already been signed.
func (node *AlgorandFullNode) BroadcastSignedTxGroup(txgroup []transactions.SignedTxn) (err error) {
// in developer mode, we need to take a lock, so that each new transaction group would truely
// in developer mode, we need to take a lock, so that each new transaction group would truly
// render into a unique block.
if node.devMode {
node.mu.Lock()
Expand Down
2 changes: 1 addition & 1 deletion nodecontrol/nodeControlErrors.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ func (e *errAlgodExitedEarly) Error() string {
return fmt.Sprintf("node exited with an error code, check node.log for more details : %v", e.innerError)
}

func (e *errAlgodExitedEarly) Unwrap(err error) error {
func (e *errAlgodExitedEarly) Unwrap() error {
return e.innerError
}