Skip to content

Commit

Permalink
Moving golnagci-lint to v1.46
Browse files Browse the repository at this point in the history
  • Loading branch information
armfazh committed May 11, 2022
1 parent a4b8552 commit be60a91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Linting
uses: golangci/golangci-lint-action@v3
with:
version: v1.45
version: v1.46
args: --config=./.etc/golangci.yml ./...
- name: Check shadowing
run: |
Expand Down
16 changes: 5 additions & 11 deletions ecc/fourq/point_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func TestScalarMult(t *testing.T) {

func TestScalar(t *testing.T) {
const testTimes = 1 << 12
var x, xx [5]uint64
var xx [5]uint64
two256 := big.NewInt(1)
two256.Lsh(two256, 256)
two64 := big.NewInt(1)
Expand All @@ -137,9 +137,7 @@ func TestScalar(t *testing.T) {
for i := 0; i < testTimes; i++ {
bigX, _ := rand.Int(rand.Reader, two256)
conv.BigInt2Uint64Le(xx[:], bigX)
for j := range xx {
x[j] = xx[j]
}
x := xx
bigY, _ := rand.Int(rand.Reader, two64)
y := bigY.Int64()
bigY.SetInt64(y)
Expand All @@ -160,9 +158,7 @@ func TestScalar(t *testing.T) {
for i := 0; i < testTimes; i++ {
bigX, _ := rand.Int(rand.Reader, two256)
conv.BigInt2Uint64Le(xx[:], bigX)
for j := range xx {
x[j] = xx[j]
}
x := xx
bigY, _ := rand.Int(rand.Reader, two64)
y := bigY.Int64()
bigY.SetInt64(y)
Expand All @@ -182,9 +178,7 @@ func TestScalar(t *testing.T) {
for i := 0; i < testTimes; i++ {
bigX, _ := rand.Int(rand.Reader, two256)
conv.BigInt2Uint64Le(xx[:], bigX)
for j := range xx {
x[j] = xx[j]
}
x := xx

condAddOrderN(&x)
got := conv.Uint64Le2BigInt(x[:])
Expand Down Expand Up @@ -219,7 +213,7 @@ func TestScalar(t *testing.T) {
}

if got.Cmp(want) != 0 {
test.ReportError(t, got, want, x)
test.ReportError(t, got, want, k)
}
}
})
Expand Down

0 comments on commit be60a91

Please sign in to comment.