mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
Add linter checks to GHA & Fix code to pass lints
Add linter checks to GHA & Fix code to pass lints. The linters added are: - whitespace: Tool for detection of leading and trailing whitespace - gosec: Inspects source code for security problems - gci: Gci control golang package import order and make it always deterministic - misspell: Finds commonly misspelled English words in comments - gomnd: An analyzer to detect magic numbers The file utils/utils.go is excluded from the checks of gomnd, as uses magic numbers through the code
This commit is contained in:
@@ -313,7 +313,7 @@ func (p *Parser) parseLine() (*Instruction, error) {
|
||||
c.Literal += line
|
||||
return c, err
|
||||
}
|
||||
if fee > 255 {
|
||||
if fee > common.MAXFEEPLAN-1 {
|
||||
line, _ := p.s.r.ReadString('\n')
|
||||
c.Literal += line
|
||||
return c, fmt.Errorf("Fee %d can not be bigger than 255", fee)
|
||||
|
||||
@@ -143,7 +143,6 @@ func GenerateTestTxs(t *testing.T, instructions Instructions) ([][]*common.L1Tx,
|
||||
default:
|
||||
continue
|
||||
}
|
||||
|
||||
}
|
||||
l1Txs = append(l1Txs, batchL1Txs)
|
||||
coordinatorL1Txs = append(coordinatorL1Txs, batchCoordinatorL1Txs)
|
||||
|
||||
Reference in New Issue
Block a user