Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add .justfile #2325

Merged
merged 1 commit into from
Aug 22, 2024
Merged

Conversation

williballenthin
Copy link
Collaborator

@williballenthin williballenthin commented Aug 22, 2024

This PR adds a "justfile", which is a configuration file for the tool just. Just is a command runner, like a simplified Make.

I've been having trouble remembering the pre-commit command line invocations needed to run the various linters. Some need --hook-stage manual and others don't. Usually I use my shell's history to find the command I need, but its painful when I move to a new system. I want to use Just to hide all these extra flags away, so I can just type:

just isort

image

just isort black

image

just lint

image

The configuration file is hidden, that is, the filename is .justfile, so it won't show up in most directory listings. I'm not sure that we have to add even more documentation about this file, though I'm happy to do so if we expect enough users. Otherwise, its nice for the file to be present, but doesn't affect anything otherwise.

We could optionally migrate from pre-commit to Just, but I don't think we should. pre-commit has nice git integration, it already works for us, and churn is annoying.

Checklist

  • No CHANGELOG update needed
  • No new tests needed
  • No documentation update needed

@williballenthin williballenthin added the enhancement New feature or request label Aug 22, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Please add bug fixes, new features, breaking changes and anything else you think is worthwhile mentioning to the master (unreleased) section of CHANGELOG.md. If no CHANGELOG update is needed add the following to the PR description: [x] No CHANGELOG update needed

@github-actions github-actions bot dismissed their stale review August 22, 2024 10:48

CHANGELOG updated or no update needed, thanks! 😄

Copy link
Collaborator

@mr-tz mr-tz left a comment

Choose a reason for hiding this comment

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

very cool, definitely an issue for me as well to remember how to run pre-commit sometimes

@williballenthin williballenthin merged commit 6c883f3 into mandiant:master Aug 22, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants