Skip to content

Exclude Pipfile.lock from pretty-format-json pre-commit hook#42

Closed
jsf9k wants to merge 1 commit intodevelopfrom
improvement/exclude-pipenv-lock-file
Closed

Exclude Pipfile.lock from pretty-format-json pre-commit hook#42
jsf9k wants to merge 1 commit intodevelopfrom
improvement/exclude-pipenv-lock-file

Conversation

@jsf9k
Copy link
Copy Markdown
Member

@jsf9k jsf9k commented Jan 22, 2026

🗣 Description

This pull request modifies the pre-commit configuration to exclude Pipfile.lock from the pretty-format-json hook.

💭 Motivation and context

We will simply let pipenv format those files however it wants; we don't care about prettifying them since they are for the most part only read by machines. This also saves us some time and effort on Dependabot PRs that update the Pipfile.lock file since they should pass the pre-commit linters without being reformatted.

🧪 Testing

All automated tests pass.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All new and existing tests pass.

We will simply let pipenv format those files however it wants; we
don't care about prettifying them since they are for the most part
only read by machines.
@jsf9k jsf9k self-assigned this Jan 22, 2026
@jsf9k jsf9k added the improvement This issue or pull request will add or improve functionality, maintainability, or ease of use label Jan 22, 2026
@jsf9k jsf9k added the dependencies Pull requests that update a dependency file label Jan 22, 2026
@jsf9k jsf9k moved this to In Progress in Next Kraken Jan 22, 2026
@jsf9k jsf9k moved this from In progress to Review in progress in Skeleton Maintenance Jan 22, 2026
@jsf9k jsf9k marked this pull request as ready for review January 22, 2026 20:39
Copy link
Copy Markdown
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

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

🎉

@dav3r
Copy link
Copy Markdown
Member

dav3r commented Apr 2, 2026

@mcdonnnj Can you please review this change? It will make our lives easier with all of the dependabot PRs that currently fail linting.

@mcdonnnj
Copy link
Copy Markdown
Member

mcdonnnj commented Apr 2, 2026

Is there any reason this shouldn't be baked into the base configuration housed in cisagov/skeleton-generic?

@dav3r
Copy link
Copy Markdown
Member

dav3r commented Apr 2, 2026

Is there any reason this shouldn't be baked into the base configuration housed in cisagov/skeleton-generic?

The only argument against that is it's not really necessary since we don't have pipfiles in skeleton-generic. I seem to recall we had another similar situation in the past, but I don't recall which way we went with it. I'm fine either way.

@mcdonnnj
Copy link
Copy Markdown
Member

mcdonnnj commented Apr 3, 2026

Is there any reason this shouldn't be baked into the base configuration housed in cisagov/skeleton-generic?

The only argument against that is it's not really necessary since we don't have pipfiles in skeleton-generic. I seem to recall we had another similar situation in the past, but I don't recall which way we went with it. I'm fine either way.

I think that since we would make use of this in at least two descendant skeleton projects, and since it has no negative impact, we should punt it up to the base configuration in cisagov/skeleton-generic.

@dav3r
Copy link
Copy Markdown
Member

dav3r commented Apr 6, 2026

Is there any reason this shouldn't be baked into the base configuration housed in cisagov/skeleton-generic?

The only argument against that is it's not really necessary since we don't have pipfiles in skeleton-generic. I seem to recall we had another similar situation in the past, but I don't recall which way we went with it. I'm fine either way.

I think that since we would make use of this in at least two descendant skeleton projects, and since it has no negative impact, we should punt it up to the base configuration in cisagov/skeleton-generic.

That logic works for me. @jsf9k, unless you have major objections, can you please make a PR for this in skeleton-generic and then close this one out?

@jsf9k
Copy link
Copy Markdown
Member Author

jsf9k commented Apr 7, 2026

The only argument against that is it's not really necessary since we don't have pipfiles in skeleton-generic. I seem to recall we had another similar situation in the past, but I don't recall which way we went with it. I'm fine either way.

Won't the check-useless-excludes pre-commit hook fail if nothing matches the regex?

@dav3r
Copy link
Copy Markdown
Member

dav3r commented Apr 7, 2026

The only argument against that is it's not really necessary since we don't have pipfiles in skeleton-generic. I seem to recall we had another similar situation in the past, but I don't recall which way we went with it. I'm fine either way.

Won't the check-useless-excludes pre-commit hook fail if nothing matches the regex?

That is a good point. @mcdonnnj Any thoughts?

@mcdonnnj
Copy link
Copy Markdown
Member

mcdonnnj commented Apr 7, 2026

The only argument against that is it's not really necessary since we don't have pipfiles in skeleton-generic. I seem to recall we had another similar situation in the past, but I don't recall which way we went with it. I'm fine either way.

Won't the check-useless-excludes pre-commit hook fail if nothing matches the regex?

That is a good point. @mcdonnnj Any thoughts?

He is correct and I completely forgot about that hook. I guess the only alternative thought I had was adding the exclude but commenting it out until needed. Basically treating it similar to dependabot ignore statements that we enable downstream, but in this case enable as needed. I just like the idea of storing a configuration detail used across multiple skeleton lineages in a single place.

@jsf9k
Copy link
Copy Markdown
Member Author

jsf9k commented Apr 7, 2026

I guess the only alternative thought I had was adding the exclude but commenting it out until needed. Basically treating it similar to dependabot ignore statements that we enable downstream, but in this case enable as needed. I just like the idea of storing a configuration detail used across multiple skeleton lineages in a single place.

For the love of JVPITER! Closing this PR in favor of cisagov/skeleton-generic#261.

@jsf9k jsf9k closed this Apr 7, 2026
@github-project-automation github-project-automation bot moved this from Review in progress to Done in Skeleton Maintenance Apr 7, 2026
@github-project-automation github-project-automation bot moved this from In Progress to Done in Next Kraken Apr 7, 2026
@jsf9k jsf9k deleted the improvement/exclude-pipenv-lock-file branch April 7, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file improvement This issue or pull request will add or improve functionality, maintainability, or ease of use

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants