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
5 changes: 5 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: 2

run:
skip-dirs:
- test/e2e
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ bin/golangci-lint:

.PHONY: validate
validate: bin/golangci-lint
./bin/golangci-lint run --skip-dirs "test/e2e"
./bin/golangci-lint run

.PHONY: build
build: validate bin bin/kvpctl.exe bin/dumpvms.exe bin/createvm.exe bin/updatevm.exe
Expand Down
2 changes: 1 addition & 1 deletion hack/install_golangci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function install() {
fi
echo $msg

curl -sSL --retry 5 https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v$VERSION
curl -sSL --retry 5 https://raw.githubusercontent.com/golangci/golangci-lint/main/install.sh | sh -s v$VERSION
}

# Undocumented behavior: golangci-lint installer requires $BINDIR in env,
Expand Down
2 changes: 1 addition & 1 deletion pkg/wmiext/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ func (i *Instance) GetCimText() string {
// will return an error otherwise.
func (i *Instance) GetAll(target interface{}) error {
elem := reflect.ValueOf(target)
if elem.Kind() != reflect.Ptr || elem.IsNil() {
if elem.Kind() != reflect.Pointer || elem.IsNil() {
return errors.New("invalid destination type for mapping a WMI instance to an object")
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/wmiext/invoke.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (e *MethodExecutor) Out(name string, value interface{}) *MethodExecutor {
var cimType CIMTYPE_ENUMERATION
var result interface{}
dest := reflect.ValueOf(value)
if dest.Kind() != reflect.Ptr {
if dest.Kind() != reflect.Pointer {
e.err = fmt.Errorf("Out() on %q called with %T, out parameters must be a reference", name, value)
return e
}
Expand Down