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

feat(install-dev): Add pre-commit hook #520

Merged
merged 5 commits into from Jul 6, 2022
Merged

Conversation

achimnol
Copy link
Member

@achimnol achimnol commented Jul 6, 2022

  • Run the linters for changed files in the pre-commit hook
  • Improve install-dev.sh to check existence of hook scripts

* Improve install-dev.sh to check existence of hook scripts
@achimnol achimnol added this to the 22.03 milestone Jul 6, 2022
@achimnol achimnol added area:infrastructure Infrastructure-related issues comp:installer Related to Installer labels Jul 6, 2022
@achimnol achimnol self-assigned this Jul 6, 2022
@achimnol
Copy link
Member Author

achimnol commented Jul 6, 2022

Hmmm... I'm now skeptical to run git add -u in the pre-commit hook, as it may blindly add unwanted modified files and lines as well.

@achimnol achimnol merged commit 4824d61 into main Jul 6, 2022
@achimnol achimnol deleted the feature/add-git-commit-hook branch July 6, 2022 15:40
achimnol added a commit that referenced this pull request Jul 6, 2022
* Improve install-dev.sh to check existence of hook scripts.
* Add the git pre-commit hook to run `./pants lint --changed-since=HEAD~1`.
  Note that we should just warn and let developers run `./pants fmt`.

Backported-From: main (22.06)
Backported-To: 22.03
@Yaminyam Yaminyam added the size:M 30~100 LoC label Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:infrastructure Infrastructure-related issues comp:installer Related to Installer size:M 30~100 LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants