Skip to content

Conversation

@mmlb
Copy link
Contributor

@mmlb mmlb commented May 11, 2022

Description

  • Uses full paths to executables, so changed dirs don't matter
  • Switches to always using find -execdir to run golangci-lint to avoid an seldomly used corner case bit rotting
  • Uses the correct variable name for the golangci-lint config file

Why is this needed

Fixes: #39
Closes: #40

How Has This Been Tested?

Ran make lint a bunch in hook to make sure it works.

How are existing users impacted? What migration steps/scripts do we need?

golangci-lint will actually run if multiple modules are detected (or added w/o having to re-run lint-install).

mmlb added 4 commits May 11, 2022 12:24
This is required for golangci-lint when multiple modules are found but good
practice anyway, thus why I'm adding to all the linters.

Signed-off-by: Manuel Mendez <github@i.m.mmlb.dev>
There's not an overwhelming reason to avoid find for the single go module
setup, it works as is for that case. By doing this it means that users won't
have to remember to re-run lint-install if they go from 1 to >1 modules,
which I doubt will happen if we keep them separate. Also, the less corner
cases the better!

Signed-off-by: Manuel Mendez <github@i.m.mmlb.dev>
This was missed in b48895c.

Signed-off-by: Manuel Mendez <github@i.m.mmlb.dev>
Signed-off-by: Manuel Mendez <github@i.m.mmlb.dev>
@mmlb mmlb requested a review from tstromberg May 11, 2022 17:44
Copy link
Contributor

@tstromberg tstromberg left a comment

Choose a reason for hiding this comment

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

👌

@mmlb mmlb added the ready-to-merge Signal to Mergify to merge the PR. label May 11, 2022
@mergify mergify bot merged commit 1fbf2d2 into tinkerbell:main May 11, 2022
@mmlb mmlb deleted the fix-multiple-go-modules branch May 11, 2022 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Signal to Mergify to merge the PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

multi-module repos: find: ‘out/linters/golangci-lint-v1.43.0-x86_64’: No such file or directory

2 participants