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

.github/workflows/ci.yaml: update golangci-lint to v1.33.0 #1151

Merged
merged 3 commits into from
Nov 30, 2020

Conversation

invidian
Copy link
Member

No description provided.

@invidian
Copy link
Member Author

invidian commented Nov 1, 2020

I suppose we need to wait for new release or Docker image update for CI to pass on this. See golangci/golangci-lint#1483 for more details.

@invidian invidian force-pushed the invidian/update-linter branch from 6dbc987 to 5bd2714 Compare November 2, 2020 14:55
@invidian invidian changed the title .github/workflows/ci.yaml: update golangci-lint to v1.32.1 .github/workflows/ci.yaml: update golangci-lint to v1.32.2 Nov 3, 2020
@invidian invidian force-pushed the invidian/update-linter branch from 5bd2714 to 85af08c Compare November 3, 2020 07:21
@invidian invidian requested a review from knrt10 November 3, 2020 07:21
@knrt10
Copy link
Member

knrt10 commented Nov 3, 2020

I just want to confirm, was the skip option not working before?

@invidian
Copy link
Member Author

invidian commented Nov 3, 2020

I just want to confirm, was the skip option not working before?

Hmm, I don't remember now, but I tested it 😞 According to the action logs, skipped names are passed simply as a parameters, so resulting options were like --skip-flag foo bar baz, meaning bar and baz folders/files would only be checked for typos. Now they are passed as --skip-flag foo,bar,baz.

@@ -49,7 +49,7 @@ jobs:
- name: Codespell test
uses: codespell-project/actions-codespell@master
with:
skip: vendor, ./lokoctl, *.png, assets/charts/components/*, docs/images/*,
skip: ./vendor,./lokoctl,*.png,./assets/charts/components/*,./docs/images/*,./assets/charts/components/cert-manager,./assets/charts/components/rook,./assets/charts/components/prometheus-operator,./assets/charts/components/velero,./assets/charts/components/cluster-autoscaler,./assets/charts/components/contour/crds,./assets/charts/components/openebs-operator/README.md,./assets/charts/control-plane/calico/crds,./docs/images/lokomotive-example.gif
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't it skip the entire tree? Like we have assets/charts/components/* and then specific paths again?

Copy link
Member

Choose a reason for hiding this comment

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

I was also confused, why assets/charts/components/* didn't work

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah true, I think ./assets/charts/components/* should be removed, so we are aware of new typos and we have a chance to fix them upstream.

Copy link
Member

Choose a reason for hiding this comment

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

But why check them in some and ignore them in others? How is this decided?

Copy link
Member Author

Choose a reason for hiding this comment

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

We ignore projects which are already in the codebase and contain typos. If you let's say update chart X and update brings typos, the correct thing to do is to send patch upstream fixing them and adding it to the list here until it has been fixed upstream, so it does not block merging on our side.

Copy link
Member

Choose a reason for hiding this comment

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

I think we are just creating more work by doing that. We should simply ignore the entire assets directory. We take care of things that are in our control.

The problems from upstream should not add to our mental burden.

Copy link
Member Author

Choose a reason for hiding this comment

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

I disagree. Given that we actively consume those assets, I believe we should at least contribute typo fixes back.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ping @surajssd

Copy link
Member

Choose a reason for hiding this comment

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

I don't agree on on the specific skipping we should rather skip the whole assets dir like I mentioned before, because I can see that we are creating more work for ourselves. I don't mean we should not fix the upstream for spellings but should not be at the expense of Lokomotive development resources.

Since I disagree with the change, please go ahead with merging if it is the right thing to do.

Copy link
Member Author

Choose a reason for hiding this comment

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

@iaguis what do you think?

@invidian invidian force-pushed the invidian/update-linter branch 3 times, most recently from 4f1c135 to 48210f5 Compare November 6, 2020 15:15
@invidian invidian added the priority/P3 Low priority label Nov 17, 2020
knrt10
knrt10 previously approved these changes Nov 20, 2020
@invidian invidian requested a review from surajssd November 20, 2020 13:05
@knrt10
Copy link
Member

knrt10 commented Nov 23, 2020

@invidian
Copy link
Member Author

invidian commented Nov 23, 2020

@invidian invidian changed the title .github/workflows/ci.yaml: update golangci-lint to v1.32.2 .github/workflows/ci.yaml: update golangci-lint to v1.33.0 Nov 23, 2020
@invidian invidian requested a review from knrt10 November 26, 2020 13:03
@invidian
Copy link
Member Author

Done, though I didn't test this version yet. And I already found some issues with it:

I think we can merge it. I run it locally and didn't run into any issues so far.

knrt10
knrt10 previously approved these changes Nov 26, 2020
@knrt10
Copy link
Member

knrt10 commented Nov 26, 2020

I am confused, why is there no merge conflict with 2bc0bb7 and last commit? cc @invidian

@invidian
Copy link
Member Author

I am confused, why is there no merge conflict with 2bc0bb7 and last commit? cc @invidian

I'm not sure, but I rebased it to avoid potential mess.

Using spaces in it make it only check listed files I think.

Also sync with .codespell.skip file, so we get consistent behavior
across local execution and CI.

Also avoid using wildcard on components, so we have a chance to fix
reported typos upstream before we skip them from checking.

Signed-off-by: Mateusz Gozdek <[email protected]>
@invidian invidian force-pushed the invidian/update-linter branch from 83f6c43 to c22ba6c Compare November 26, 2020 13:15
@invidian invidian merged commit cf00fdb into master Nov 30, 2020
@invidian invidian deleted the invidian/update-linter branch November 30, 2020 21:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority/P3 Low priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants