Commit 9500b21e authored by harrylee's avatar harrylee Committed by 33cn

rejust code for golangci-lint

parent 34470fe4
...@@ -18,6 +18,7 @@ function filterLinter() { ...@@ -18,6 +18,7 @@ function filterLinter() {
--enable=goimports \ --enable=goimports \
--enable=misspell \ --enable=misspell \
--enable=golint \ --enable=golint \
--skip-dirs=["plugin/dapp/evm/executor/vm/common/crypto"] \
--exclude=underscores \ --exclude=underscores \
--exclude-use-default=false --exclude-use-default=false
) )
...@@ -40,6 +41,8 @@ function testLinter() { ...@@ -40,6 +41,8 @@ function testLinter() {
--enable=goimports \ --enable=goimports \
--enable=misspell \ --enable=misspell \
--enable=golint \ --enable=golint \
--enable=nolintlint \
--skip-dirs=["plugin/dapp/evm/executor/vm/common/crypto"] \
--exclude=underscores --exclude=underscores
cd - >/dev/null || exit cd - >/dev/null || exit
......
...@@ -739,7 +739,7 @@ func TestUnpackEvent(t *testing.T) { ...@@ -739,7 +739,7 @@ func TestUnpackEvent(t *testing.T) {
} }
type ReceivedEvent struct { type ReceivedEvent struct {
Sender common.Address Sender common.Hash160Address
Amount *big.Int Amount *big.Int
Memo []byte Memo []byte
} }
...@@ -751,7 +751,7 @@ func TestUnpackEvent(t *testing.T) { ...@@ -751,7 +751,7 @@ func TestUnpackEvent(t *testing.T) {
} }
type ReceivedAddrEvent struct { type ReceivedAddrEvent struct {
Sender common.Address Sender common.Hash160Address
} }
var receivedAddrEv ReceivedAddrEvent var receivedAddrEv ReceivedAddrEvent
err = abi.Unpack(&receivedAddrEv, "receivedAddr", data) err = abi.Unpack(&receivedAddrEv, "receivedAddr", data)
......
...@@ -6,8 +6,7 @@ ...@@ -6,8 +6,7 @@
// Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve. // Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve.
//nolint:unparam // 忽视本文件所有golangci-linter检查 package bn256 //nolint
package bn256
import ( import (
bn256cf "github.com/33cn/plugin/plugin/dapp/evm/executor/vm/common/crypto/bn256/cloudflare" bn256cf "github.com/33cn/plugin/plugin/dapp/evm/executor/vm/common/crypto/bn256/cloudflare"
......
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
// +build gofuzz // +build gofuzz
//nolint:unparam // 忽视本文件所有golangci-linter检查 package bn256 //nolint
package bn256
import ( import (
"bytes" "bytes"
......
...@@ -6,8 +6,7 @@ ...@@ -6,8 +6,7 @@
// Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve. // Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve.
//nolint:unparam // 忽视本文件所有golangci-linter检查 package bn256 //nolint
package bn256
import bn256 "github.com/33cn/plugin/plugin/dapp/evm/executor/vm/common/crypto/bn256/google" import bn256 "github.com/33cn/plugin/plugin/dapp/evm/executor/vm/common/crypto/bn256/google"
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
// http://cryptojedi.org/papers/dclxvi-20100714.pdf. Its output is compatible // http://cryptojedi.org/papers/dclxvi-20100714.pdf. Its output is compatible
// with the implementation described in that paper. // with the implementation described in that paper.
//nolint:unparam // 忽视本文件所有golangci-linter检查 //nolint:unparam
package bn256 package bn256
import ( import (
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
// (This package previously claimed to operate at a 128-bit security level. // (This package previously claimed to operate at a 128-bit security level.
// However, recent improvements in attacks mean that is no longer true. See // However, recent improvements in attacks mean that is no longer true. See
// https://moderncrypto.org/mail-archive/curves/2016/000740.html.) // https://moderncrypto.org/mail-archive/curves/2016/000740.html.)
//nolint:unparam // 忽视本文件所有golangci-linter检查
package bn256 package bn256 //nolint
import ( import (
"crypto/rand" "crypto/rand"
......
// Copyright 2012 The Go Authors. All rights reserved. // Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//nolint:unparam // 忽视本文件所有golangci-linter检查
package bn256 package bn256 //nolint
import ( import (
"bytes" "bytes"
......
// Copyright 2012 The Go Authors. All rights reserved. // Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//nolint:unparam // 忽视本文件所有golangci-linter检查
package bn256 package bn256 //nolint
import ( import (
"math/big" "math/big"
......
// Copyright 2012 The Go Authors. All rights reserved. // Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//nolint:unparam // 忽视本文件所有golangci-linter检查
package bn256 package bn256 //nolint
import ( import (
"math/big" "math/big"
......
// Copyright 2012 The Go Authors. All rights reserved. // Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//nolint:unparam // 忽视本文件所有golangci-linter检查
package bn256 package bn256 //nolint
import ( import (
"crypto/rand" "crypto/rand"
......
// Copyright 2012 The Go Authors. All rights reserved. // Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//nolint:unparam // 忽视本文件所有golangci-linter检查
package bn256 package bn256 //nolint
// For details of the algorithms used, see "Multiplication and Squaring on // For details of the algorithms used, see "Multiplication and Squaring on
// Pairing-Friendly Fields, Devegili et al. // Pairing-Friendly Fields, Devegili et al.
......
// Copyright 2012 The Go Authors. All rights reserved. // Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//nolint:unparam // 忽视本文件所有golangci-linter检查
package bn256 package bn256 //nolint
// For details of the algorithms used, see "Multiplication and Squaring on // For details of the algorithms used, see "Multiplication and Squaring on
// Pairing-Friendly Fields, Devegili et al. // Pairing-Friendly Fields, Devegili et al.
......
// Copyright 2012 The Go Authors. All rights reserved. // Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//nolint:unparam // 忽视本文件所有golangci-linter检查
package bn256 package bn256 //nolint
// For details of the algorithms used, see "Multiplication and Squaring on // For details of the algorithms used, see "Multiplication and Squaring on
// Pairing-Friendly Fields, Devegili et al. // Pairing-Friendly Fields, Devegili et al.
......
//nolint:unparam // 忽视本文件所有golangci-linter检查
package bn256 package bn256 //nolint
import ( import (
"testing" "testing"
......
// Copyright 2012 The Go Authors. All rights reserved. // Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//nolint:unparam // 忽视本文件所有golangci-linter检查
package bn256 package bn256 //nolint
func lineFunctionAdd(r, p *twistPoint, q *curvePoint, r2 *gfP2, pool *bnPool) (a, b, c *gfP2, rOut *twistPoint) { func lineFunctionAdd(r, p *twistPoint, q *curvePoint, r2 *gfP2, pool *bnPool) (a, b, c *gfP2, rOut *twistPoint) {
// See the mixed addition algorithm from "Faster Computation of the // See the mixed addition algorithm from "Faster Computation of the
......
// Copyright 2012 The Go Authors. All rights reserved. // Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//nolint:unparam // 忽视本文件所有golangci-linter检查
package bn256 package bn256 //nolint
import ( import (
"math/big" "math/big"
......
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//nolint:unparam // 忽视本文件所有golangci-linter检查 package model //nolint
package model
const ( const (
// WordBitSize 内存中存储的字,占用多少位 // WordBitSize 内存中存储的字,占用多少位
......
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//nolint:unparam // 忽视本文件所有golangci-linter检查 package model //nolint
package model
import "errors" import "errors"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment