1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/mirrors-iceoryx

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
Readme.md 2 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Mathias Kraus Отправлено 19.07.2022 16:24 b8ed443

Git Hooks for iceoryx

When developing on iceoryx, git-hooks are doing some sanity checks and can execute linters/formatters when you commit code. In the current state the git hooks do the following job:

  • checking that commit messages follow the format [iox-<Github issue number>] and auto-format them if necessary
  • check that the commit messages subject and body follow six of the seven rules of a great commit message
  • remove trailing whitespace from all modified files
  • run clang-format on all files to commit
  • run clang-tidy on all files to commit, modified files will drop warnings, newly added files treat warnings as errors when the linter detects a warning.

You can install them with the following command:

sudo apt install clang-format clang-tidy

It is recommended to use the latest stable version for both tools. The scripts currently don't accept any major version lower than 12 for both tools.

Installation

The hooks are active when you add the git-hooks directory as hooks folder to your local project git config:

cd iceoryx
git config core.hooksPath tools/git-hooks/

With that you will also receive the updates of the git hooks in the future. We recommend doing this in every new clone you did on iceoryx.

Seven Rules for a good commit message

  1. Separate subject from body with a blank line
  2. Limit the subject line to 50 characters (excluding GitHub issue number)
  3. Capitalize the subject line
  4. Do not end the subject line with a period
  5. Use the imperative mood in the subject line
  6. Wrap the body at 72 characters
  7. Use the body to explain what and why vs. how (not checked in hooks)

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/mirrors-iceoryx.git
git@api.gitlife.ru:oschina-mirror/mirrors-iceoryx.git
oschina-mirror
mirrors-iceoryx
mirrors-iceoryx
main