firecracker icon indicating copy to clipboard operation
firecracker copied to clipboard

[Feature Request] Implement `./tools/devtool fixstyle`

Open seafoodfry opened this issue 1 year ago • 1 comments

Feature Request

While working on some documentation, I discovered that the pre-commit script relies on some python dependencies, https://github.com/firecracker-microvm/firecracker/blob/45a1a1be3efde06f06034fbe1798c3747c1424cd/pre-commit#L32-L39

I'm opening this ticket to discuss whether there'd be interest in creating a ./tools/devtool fixstyle to explicitly fix style errors and have this be used in the pre-commit.

Describe the desired solution

A possible solid solution that was offered in https://github.com/firecracker-microvm/firecracker/pull/4744

  • [ ] create ./tools/devtool fixstyle to run mdformat, isort, black, etc.
  • [ ] maybe have the pre-commit rely on ./tools/devtool fixstyle

Describe possible alternatives

Short term, I proposed documenting how to install mdformat in https://github.com/firecracker-microvm/firecracker/pull/4744 . TL;DR create a python vitualenvironment and manually install the additional deps.

Additional context

Checks

  • [x] Have you searched the Firecracker Issues database for similar requests?
  • [x] Have you read all the existing relevant Firecracker documentation?
  • [x] Have you read and understood Firecracker's core tenets?

seafoodfry avatar Aug 23 '24 13:08 seafoodfry

@seafoodfry I branched out the issue of KVM assumption as issue #4768. Thanks.

zulinx86 avatar Sep 02 '24 11:09 zulinx86

Hey @seafoodfry, I realized today that we actually already have this command! It's ./tools/devtool fmt :)

roypat avatar Nov 13 '24 15:11 roypat