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

iox-#2 Add git hooks #72

Merged
merged 3 commits into from
Sep 17, 2023
Merged

iox-#2 Add git hooks #72

merged 3 commits into from
Sep 17, 2023

Conversation

elBoberido
Copy link
Member

@elBoberido elBoberido commented Aug 23, 2023

Pre-Review Checklist for the PR Author

  1. Code follows the Rust coding style and is formatted with rustfmt
  2. Branch follows the naming format (iox-123-this-is-a-branch)
  3. Commits messages are according to this guideline
  4. Update the PR title
    • Follow the same conventions as for commit messages
    • Link to the relevant issue
  5. Relevant issues are linked
  6. Add sensible notes for the reviewer
  7. All checks have passed (except task-list-completed)
  8. Assign PR to reviewer

Notes for Reviewer

This PR adds some basic git-hooks

  • add issue number to the commit message
  • check for trailing whitespaces
  • check for style violations with cargo fmt

Checklist for the PR Reviewer

  • Commits are properly organized and messages are according to the guideline
  • Code according to our coding style and naming conventions
  • PR title describes the changes

Post-review Checklist for the PR Author

  1. All open points are addressed and tracked via issues

References

@elBoberido elBoberido self-assigned this Aug 23, 2023
@elBoberido elBoberido changed the base branch from master to iox-70-fix-all-clippy-warnings August 23, 2023 14:18
done

if [[ ${NUMBER_OF_FILES_WITH_TRAILING_WHITESPACES} -ne 0 ]]; then
echo -e "${COLOR_YELLOW}Please remove the whitespaces and commit the changes with 'git commit --amend --no-edit'${COLOR_OFF}"

Choose a reason for hiding this comment

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

Me like colors


# This script checks for trailing whitespaces on the modified file and runs 'cargo fmt --check'

set -eu

Choose a reason for hiding this comment

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

What does this little thing do?

Copy link
Member Author

Choose a reason for hiding this comment

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

The location. In my case European Union. It's us if you want to use the script from the United States ;)

  • e Exit immediately if a command exits with a non-zero status
  • u Treat unset variables as an error when substituting

Base automatically changed from iox-70-fix-all-clippy-warnings to master September 17, 2023 16:23
@codecov-commenter
Copy link

codecov-commenter commented Sep 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.83%. Comparing base (2559c28) to head (d2af8e5).

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #72   +/-   ##
=======================================
  Coverage   49.83%   49.83%           
=======================================
  Files          20       20           
  Lines        1202     1202           
=======================================
  Hits          599      599           
  Misses        603      603           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@elBoberido elBoberido merged commit fdd6495 into master Sep 17, 2023
12 checks passed
@elBoberido elBoberido deleted the iox-2-add-git-hooks branch September 17, 2023 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add git-hooks
3 participants