Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix-up (gometalinter) linting config #2163

Merged
merged 1 commit into from
Oct 25, 2019

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Oct 24, 2019

gometalinter: fix configuration

The configuration abused "Exclude" to exclude file-paths by filtering on the output, however, the Skip option was designed for that, whereas Exclude is for matching warnings.

An explicit "Skip" was added for "vendor", because even though the vendor directory should already be ignored by the linter, in some situations, it still seemed to warn on issues, so let's explicitly ignore it.

@thaJeztah
Copy link
Member Author

The configuration abused "Exclude" to exclude file-paths by filtering
on the output, however, the `Skip` option was designed for that, whereas
`Exclude` is for matching warnings.

An explicit "Skip" was added for "vendor", because even though the vendor
directory should already be ignored by the linter, in some situations,
it still seemed to warn on issues, so let's explicitly ignore it.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
Copy link
Member Author

removed one commit, as it may only be applicable with other changes

Copy link
Collaborator

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

LGTM

@kolyshkin
Copy link
Contributor

side note: why don't we switch to golangci-lint instead?

],
"Exclude": [
"parameter .* always receives",
"_esc(Dir|FS|FSString|FSMustString) is unused"
Copy link
Contributor

Choose a reason for hiding this comment

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

the commit message does not explain where this line is coming from

Copy link
Member Author

Choose a reason for hiding this comment

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

Ahm, yes. Those are from the cli/compose/schema/bindata.go file. Looks like some linters don't get passed the Skip configuration correctly, and still invalidate.

We really need to get rid of gometalinter in this repository; there's a WIP pull request #1797, but I need to find some time to carry it.

Copy link
Member

@chris-crone chris-crone left a comment

Choose a reason for hiding this comment

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

LGTM

@silvin-lubecki
Copy link
Contributor

@kolyshkin I have a PR somewhere (#1797 ) to switch to golangci-lint but never had time to rebase it and fix all the linter failures 😞

Copy link
Contributor

@silvin-lubecki silvin-lubecki left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants