Update CONTRIBUTING.md

Signed-off-by: AderKonstantin <66168124+AderKonstantin@users.noreply.github.com>
This commit is contained in:
AderKonstantin 2024-12-09 12:01:26 +03:00 committed by GitHub
parent e7fe860936
commit f73d1288c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,21 +1,22 @@
# Code Style Guide to 'RobotFire' Repo # Code Style Guide to 'RobotFire' Repo
Обращаться к [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) и к [Google C# Style Guide](https://google.github.io/styleguide/csharp-style.html) Не является обязательством, но было бы очень приятно🙂
Обращаться к [Conventional Commits](https://www.conventionalcommits.org/ru/v1.0.0/) и к [Google C# Style Guide](https://google.github.io/styleguide/csharp-style.html)
## <a name="rules"></a> Coding Rules ## <a name="rules"></a> Coding Rules
To ensure consistency throughout the source code, keep these rules in mind as you are working: Чтобы обеспечить единообразие во всем исходном коде, помните об этих правилах во время работы:
* All features or bug fixes **must be tested** by one or more specs (unit-tests). * Все функции или исправления ошибок **должны быть протестированы** одной или несколькими спецификациями (unit-tests).
* All public API methods **must be documented**. (Details TBC). * Все публичные методы API **должны быть документированы(сопровождаться комментариями)**.
* We follow [Google C# Style Guide](https://google.github.io/styleguide/csharp-style.html), but wrap all code at * Мы следуем [Google C# Style Guide](https://google.github.io/styleguide/csharp-style.html), но оберните весь код в
**100 characters**. **100 characters**.
We have very precise rules over how our git commit messages can be formatted. This leads to **more У нас есть очень точные правила относительно того, как могут быть отформатированы наши сообщения коммита git. Это приводит к **более
readable messages** that are easy to follow when looking through the **project history**. But also, читабельным сообщениям**, которые легко отслеживать при просмотре **истории проекта**. Но также,
we use the git commit messages to **generate the Angular change log**. мы используем сообщения коммита git для **генерации журнала изменений кода**.
### Commit Message Format ### Commit Message Format
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special Иметь сообщение к коммиту не обязательно.
format that includes a **type**, a **scope** and a **subject**: Каждое сообщение о коммите состоит из **header**, **body** и **footer**. Заголовок имеет специальный формат, который включает **type**, **scope** и **subject**:
``` ```
<type>(<scope>): <subject> <type>(<scope>): <subject>
@ -25,14 +26,13 @@ format that includes a **type**, a **scope** and a **subject**:
<footer> <footer>
``` ```
The **header** is mandatory and the **scope** of the header is optional. **Header** обязателен, а **scope** заголовка необязательна.
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier Любая строка сообщения о коммите не может быть длиннее 100 символов! Это позволяет упростить чтение сообщения на GitHub, а также в различных инструментах git.
to read on GitHub as well as in various git tools.
The footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any. Нижний колонтитул должен содержать [закрывающую ссылку на проблему](https://help.github.com/articles/closing-issues-via-commit-messages/) если таковая имеется.
Samples: (even more [samples](https://github.com/angular/angular/commits/master)) [Примеры](https://github.com/angular/angular/commits/master)
``` ```
docs(changelog): update changelog to beta.5 docs(changelog): update changelog to beta.5
@ -43,18 +43,18 @@ fix(release): need to depend on latest rxjs and zone.js
The version in our package.json gets copied to the one we publish, and users need the latest of these. The version in our package.json gets copied to the one we publish, and users need the latest of these.
``` ```
### Revert ### Revert / Отмена
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted. Если коммит отменяет предыдущий коммит, он должен начинаться с `revert: `, за которым следует заголовок отменяемого коммита. В теле должно быть написано: `Это отменяет коммит <hash>.`, где хэш — это SHA отменяемого коммита.
### Type ### Type / Тип
Must be one of the following: Должно быть одно из следующего:
* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) * **build**: Изменения, влияющие на систему сборки или внешние зависимости(packages, etc).
* **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) * **ci**: Изменения в наших файлах конфигурации CI и скриптах (примеры областей: GitHub Actions, GitLab CI, Jenkins, etc).
* **docs**: Documentation only changes * **docs**: Файлы документации.
* **feat**: A new feature * **feat**: Новая функция или изменения касательно функционала(в том числе геймплей).
* **fix**: A bug fix * **fix**: Фиксы багов.
* **perf**: A code change that improves performance * **perf**: Изменение кода, повышающее производительность (но не добавляющий новый функционал).
* **refactor**: A code change that neither fixes a bug nor adds a feature * **refactor**: Изменение кода, которое не исправляет ошибку и не добавляет функцию.
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) * **style**: Изменения, не влияющие на смысл кода (пробелы, форматирование, пропущенные точки с запятой и т. д.).
* **test**: Adding missing tests or correcting existing tests * **test**: Добавление отсутствующих тестов или исправление существующих тестов.