Skip to content

chore: add precommit hook and update linted files #1534

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

davidornelas11
Copy link
Contributor

add precommit hook and update linted files

Checklist

  • Tests pass for relevant code changes

Links

@davidornelas11 davidornelas11 requested a review from a team as a code owner May 12, 2025 20:08
@asu-jenkins-devops
Copy link
Collaborator

Copy link
Contributor

@scott-williams-az scott-williams-az left a comment

Choose a reason for hiding this comment

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

I was thinking this hook would be a pre-push hook. (can we include tests too? it will save us from pushing a failed build to jenkins)

Sometimes while developing locally I just want to commit my changes. I may have code I know is not ready for a PR but I need to make a checkpoint.

We should as much as possible make sure all paths are covered.
git commit calls the hook
yarn commit or calling cz does not call prepare-commit-msg

exit 1
else
echo "Adding linted files to staging..."
git add .
Copy link
Contributor

Choose a reason for hiding this comment

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

We do not want to add all files, in an automatic way without the contributor knowing. This should be the developers choice to include changes.

  1. It is possible for a contributor to have changes they do not want to include with the commit.
  2. I think this prevents contributor from making smaller commits to group similar changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants