Is there any easy `fix` command to run linters acr...
# flyte-support
c
Is there any easy
fix
command to run linters across the entire project and have them update files in place?
b
this doesn’t currently exist, but this is a great idea! what kinds of fixes would you have in mind?
c
Mostly the
goimports
and
gci
since I'm working on a backend plugin. I try to run the linter from
make
locally but it errors out when it notices I already have some binaries downloaded. Looks like the scripts are designed to be run from a fresh install on CI every time. There may be some room for improvement there too i guess
t
does
make goimports
work?
i assume this is the main flyte repo?
c
Yeah.
make goimports
does work, although it results in very noisy changes (flytectl, generated files, etc). Ah I see that comes from an imported
Makefile
nice
Let me fix the
goimports
make target...
t
if it’s coming from the boilerplate repo, feel free to override (just add a comment)
and thanks
the boilerplate repo is something we need to deprecate, just haven’t had the time.
it made a lot more sense back when all the components were in different repos.
h
@thankful-minister-83577, a minor correction: boilerplate was moved to the monorepo (in fact the original repo is marked as readonly), so making this change is just a matter of fixing
goimports
in the flyte repo.
c
I think I have an elegant solution here? https://github.com/flyteorg/flyte/pull/5484
imo the
goimports
make target should be abandoned entirely because its just trying (and not successfully) to stay in sync with
golangci-lint
configs nestled through the monorepo. So why not just use
golangci-lint --fix
which will be completely aligned with CI.
h
@clean-glass-36808, thanks for your PR. Left one small comment.
c
Thanks for the feedback, just pushed an update