Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Fix linting on master #688

Merged
merged 1 commit into from
Apr 3, 2019
Merged

Conversation

silvin-lubecki
Copy link
Contributor

The lint pass is failing on master, and the only reason I see is that golangci-lint was silently updated, as we always use the last version.
That's why I pinned the tool to the current version to prevent from futur failures.

Here is the output:

golangci-lint run --config ./golangci.yml
cmd/duffle/upgrade_test.go:31:4: composites: `github.com/deislabs/duffle/pkg/bundle.InvocationImage` composite literal uses unkeyed fields (govet)
			{
			^
pkg/action/action_test.go:40:4: composites: `github.com/deislabs/duffle/pkg/bundle.InvocationImage` composite literal uses unkeyed fields (govet)
			{
			^
pkg/packager/export.go:42:9: nilness: impossible condition: nil != nil (govet)
	if err != nil {
	       ^
pkg/packager/import.go:43:9: nilness: impossible condition: nil != nil (govet)
	if err != nil {
	       ^
make: *** [lint] Error 1
Makefile:74: recipe for target 'lint' failed

Signed-off-by: Silvin Lubecki [email protected]

Pin golangci-lint version in Makefile to prevent futur sudden linting errors if the tool is updated

Signed-off-by: Silvin Lubecki <[email protected]>
Copy link
Member

@radu-matei radu-matei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@radu-matei radu-matei merged commit ebd6715 into cnabio:master Apr 3, 2019
michelleN pushed a commit to michelleN/duffle that referenced this pull request Apr 5, 2019
The lint pass is failing on `master`, and the only reason I see is that `golangci-lint` was silently updated, as we always use the last version.
That's why I pinned the tool to the current version to prevent from futur failures.

Here is the output:
```
golangci-lint run --config ./golangci.yml
cmd/duffle/upgrade_test.go:31:4: composites: `github.com/deislabs/duffle/pkg/bundle.InvocationImage` composite literal uses unkeyed fields (govet)
			{
			^
pkg/action/action_test.go:40:4: composites: `github.com/deislabs/duffle/pkg/bundle.InvocationImage` composite literal uses unkeyed fields (govet)
			{
			^
pkg/packager/export.go:42:9: nilness: impossible condition: nil != nil (govet)
	if err != nil {
	       ^
pkg/packager/import.go:43:9: nilness: impossible condition: nil != nil (govet)
	if err != nil {
	       ^
make: *** [lint] Error 1
Makefile:74: recipe for target 'lint' failed
```

Signed-off-by: Silvin Lubecki <[email protected]>
@silvin-lubecki silvin-lubecki deleted the fix-linting branch April 8, 2019 15:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants