tinkerbell / lint-install

Consistently install reasonable linter rules for open-source projects
Apache License 2.0
6 stars 7 forks source link

what to do when a repo needs an override? #44

Open mmlb opened 2 years ago

mmlb commented 2 years ago

I've tried to use lint-install's .golangci.yml file but it doesn't work for the tinkerbell/tink repo as is. We need to add an extra exclusion due to kubebuilder, see https://github.com/tinkerbell/tink/blob/main/.golangci.yml#L191-L193. I can think of 2 options.

  1. Add the exclusion to lint-install, every project will now share the config.
  2. Add a way for the project to have a .golangci.local.yml that lint-install merges with it's embedded file.

Option 1 upholds the one-way-to-do-things we currently want lint-install to enforce, but there might be some wiggle room for some things ... maybe.

Option 2 provides an escape hatch that if left unchecked can go against the very reason lint-install exists to begin with. Maybe instead of full merge lint-install will only merge from local if the embedded file doesn't already have that linter configured? This way local files can't override config of lint-install.

Thoughts @nshalman @tstromberg ?