如何在gometalinter中禁用pkcs11?

When unit test, or build my code, I have to use the following command:

go test --tags nopkcs11

I am using https://github.com/alecthomas/gometalinter on windows for linting.

The gometalinter works well, but whenever I run linting, I can see a large number (hundreds) of messages like this:

c:\Users\xxxxxxxxx\workspace\go\src\github.com\hyperledger\fabric\bccsp\pkcs11\impl.go:70:24:warning: SessionHandle not declared by package pkcs11 (staticcheck) c:\Users\xxxxxxxxx\workspace\go\src\github.com\hyperledger\fabric\bccsp\pkcs11\impl.go:70:24:warning: SessionHandle not declared by package pkcs11 (staticcheck) c:\Users\xxxxxxxxx\workspace\go\src\github.com\hyperledger\fabric\bccsp\pkcs11\pkcs11.go:39:9:warning: New not declared by package pkcs11 (staticcheck) c:\Users\xxxxxxxxx\workspace\go\src\github.com\hyperledger\fabric\bccsp\pkcs11\pkcs11.go:50:20:warning: cannot range over slots (invalid operand) (staticcheck)

I run the metalinter in the following manner:

$ gometalinter.v1 ./...

Is there a way to disable pkcs11 on gometalinter?

This is a bit of a hack + a windows user will have to have a unix terminal:

gometalinter.v1 ./... --deadline 10000000ms  | awk '!/pkcs11/'

It looks like you can use a configuration file for your project, per the gometalinter documentation. You can use the Exclude setting to set regular expressions that, if a message matches the pattern, the message will not be output.