Skip to content

[Feature Request] Implement ./tools/devtool fixstyle #4747

@seafoodfry

Description

@seafoodfry

Feature Request

While working on some documentation, I discovered that the pre-commit script relies on some python dependencies,

firecracker/pre-commit

Lines 32 to 39 in 45a1a1b

if [ "$extension" = "py" ]; then
# Apply formatters for this file
black $i
isort $i
fi
if [ "$extension" = "md" ]; then
mdformat $i
fi

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 #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 #4744 .
TL;DR create a python vitualenvironment and manually install the additional deps.

Additional context

Checks

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good first issueIndicates a good issue for first-time contributorsPriority: LowIndicates that an issue or pull request should be resolved behind issues or pull requests labelled `Status: ParkedIndicates that an issues or pull request will be revisited later

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions