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

meta: Add Pre Commit Hook #1946

Merged
merged 3 commits into from
Jul 7, 2022
Merged

meta: Add Pre Commit Hook #1946

merged 3 commits into from
Jul 7, 2022

Conversation

philipphofmann
Copy link
Member

Add pre-commit to call clang-format and a couple
of other checks.

#skip-changelog

Add pre commit to call clang-format and a couple
of other checks.
@philipphofmann philipphofmann changed the title meta: Add Pre Commit meta: Add Pre Commit Hook Jul 7, 2022
@kevinrenskers
Copy link
Contributor

BTW, I think rbenv should be added to the Brewfile. I didn't have it installed for example, and it stopped make init.

@philipphofmann philipphofmann merged commit fe16a1b into master Jul 7, 2022
@philipphofmann philipphofmann deleted the build/pre-commit branch July 7, 2022 08:29
kevinrenskers added a commit that referenced this pull request Jul 7, 2022
Comment on lines +1 to +11
init: setup-git
which brew || /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew bundle
rbenv install --skip-existing
rbenv exec gem update bundler
rbenv exec bundle update
cd Samples/TrendingMovies && carthage update --use-xcframeworks

setup-git:
ifneq (, $(shell which pre-commit))
pre-commit install
Copy link
Member

Choose a reason for hiding this comment

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

This setup won't work on new systems. We need to add pre-commit to Brewfile, otherwise it'll never be installed, and setup-git will never install the hooks. Also, I think it'd be better to avoid the dependency indirection and which check, by putting pre-commit install directly into make init after brew bundle.

Copy link
Contributor

Choose a reason for hiding this comment

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

It got added to the Brewfile in #1947

kevinrenskers added a commit that referenced this pull request Jul 8, 2022
* master:
  build: Remove trailing-whitespace (#1953)
  ci: Compile iOS13-Swift sample (#1951)
  release: 7.20.0
  meta: Fix changelog (#1950)
  feat: Add sample rate in the baggage header, remove Userid and Transaction (#1936)
  build: Upate Brewfile.lock and Gemfile.lock (#1947)
  meta: Add Pre Commit Hook (#1946)
  ref: Remove unused SentryCrashDeadlock (#1941)
  feat: Add screenshot at crash (#1920)
  Add code docs for SentryScope (#1942)
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.

None yet

4 participants