-
Notifications
You must be signed in to change notification settings - Fork 9
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
Adds remote pre-commit installer, which includes automatic fix for linter #1369
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
afterxleep
force-pushed
the
daniel/lint-fix
branch
from
August 4, 2023 12:40
cb1668c
to
ad4a2ef
Compare
afterxleep
changed the title
Add Commit hook install script
Adds remote pre-commit installer, which includes automatic fix for linter
Aug 4, 2023
ayoy
approved these changes
Aug 8, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :) it works great after some updates I made to the BSK script, and you can also greatly simplify the pre-commit.sh script in this repo (see the comment below). Nice work!
afterxleep
added a commit
to duckduckgo/BrowserServicesKit
that referenced
this pull request
Aug 23, 2023
Please review the release process for BrowserServicesKit here. Required: Task/Issue URL: https://app.asana.com/0/1200194497630846/1205110674679790/f iOS PR: duckduckgo/iOS#1845 macOS PR: duckduckgo/macos-browser#1369 What kind of version bump will this require?: None, this is just a CI change Descrption: Adds a script that allows us to automatically install a pre-commit hook that runs swiftlint --fix The original installation script lives in BSK for easier maintenance. App Scripts download it and install it locally. (Remote URL will be updated once we merge BSK. This script can be extended as necesary to install/manage additional pre-commit hooks
samsymons
added a commit
that referenced
this pull request
Aug 23, 2023
# By Diego Rey Mendez (7) and others # Via Sam Symons (2) and others * develop: (26 commits) Improve Sync-related database cleaning logic (#1529) Update onboarding-related error states (#1504) Prevents launching our menu agent without an auth code. (#1516) Autofill UI letter icons (#1535) Cleans up some code (#1517) Revert "Autofill Letter Icons" (#1534) Adds remote pre-commit installer, which includes automatic fix for linter (#1369) Autofill Letter Icons (#1475) change context menu for mailto links (#1513) Updates the version to 1.53.1 Updated the embedded files for 1.53.1 Update the phased rollout tester to avoid caching the config (#1520) Require Duck Player scheme URL to be passed from YouTube Overlay User Script (#1519) Add pixels related to Duck Player usage (#1515) only allow error reloads on http(s) urls (#1523) Standardize TDS Loading Error handling (#1524) Move pixel sender logic into the main view controller (#1528) Update the phased rollout tester to avoid caching the config (#1520) Set version to 1.52.3. Move pixel sender logic into the main view controller (#1528) ... # Conflicts: # DuckDuckGo.xcodeproj/project.pbxproj # DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved # DuckDuckGo/AppDelegate/AppDelegate.swift # DuckDuckGo/Common/Localizables/UserText.swift # DuckDuckGo/Common/Utilities/UserDefaultsWrapper.swift
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Task URL: https://app.asana.com/0/1200194497630846/1205110674679790/f
Descrption:
Adds a script that allows us to automatically install a pre-commit hook that runs
swiftlint --fix
The original installation script lives in BSK for easier maintenance. App Scripts download it and install it locally. (Remote URL will be updated once we merge BSK. This script can be extended as necesary to install/manage additional pre-commit hooks
How to test:
Install the hook with
./scripts/pre-commit.sh --install
Add a few trail whitespaces to a file
Build the project
Commit the changes
Observe whitespace was magically cleaned up
Uninstall the hook with
./scripts/pre-commit.sh --install
Add a few trail whitespaces to a file
Build the project
Commit the changes
Observe whitespace warnings are still there
This hook also automatically correct the following rules:**