You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/commit-style.md
+88-14Lines changed: 88 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,36 +8,110 @@ Commit style accepted in __IX-Ray__ project
8
8
9
9
The project accepts commit standard for transparency and comprehension of the changes being made. The acceptable commit style is described below
10
10
11
-
## Naming
11
+
## General rules
12
+
13
+
- Commit messages must be written in English.
14
+
- Each commit message should be structured to answer the question: __"If this commit is applied, it will..."__
15
+
- The message must start with a verb in the infinitive form without the `to` particle
16
+
- No flags like `[Fix]`, `[UPDATE]`, or other tags should be included. The verb should directly describe the action performed
17
+
- Commit messages should be brief but descriptive, with additional details added in a long description if needed
18
+
- Capitalize the first letter of the commit message
19
+
- If you are unsure how to write in English, clearly describe what you did in your native language (no gibberish, we will translate and refine it later)
20
+
21
+
## Commit message structure
12
22
13
23
### Initial commits
14
24
15
-
Initial commit message should be written in the following style:
25
+
Initial commit messages should follow this structure:
16
26
17
27
```text
18
28
Initial commit
19
29
```
20
30
21
31
### Regular commits
22
32
23
-
- Pattern
33
+
Regular commit messages consist of one part, optionally followed by a long description:
34
+
35
+
```text
36
+
<Commit message body>
37
+
38
+
<Long description if necessary>
39
+
```
40
+
41
+
### Length guidelines
42
+
43
+
- The maximum length for the commit message header is __72 characters__
44
+
- Each line in the long description should also not exceed __72 characters__
45
+
46
+
## Writing commit messages
47
+
48
+
### Header format
49
+
50
+
The commit message header must begin with a verb in the infinitive form that describes the action taken in the commit. Examples:
51
+
52
+
-`Fix window manager implementation`
53
+
-`Implement audio output support`
54
+
-`Remove obsolete configurations`
55
+
-`Add documentation for API endpoints`
56
+
-`Optimize rendering pipeline`
57
+
58
+
#### Specific rules for nouns
59
+
60
+
If the message includes a noun, make sure to structure it naturally for clarity:
61
+
62
+
-`Implement new devices support (preferred)`
63
+
-`Add new gizmo support (preferred)`
64
+
-`Add support for AMD FSR (less desirable, use the structure above)`
65
+
-`Implement support for new devices (less desirable, rephrase as shown in the examples above)`
66
+
67
+
It is recommended to place the main noun after any qualifiers when possible for better readability
68
+
69
+
### Examples of correct messages
70
+
71
+
#### Single-line messages
72
+
73
+
-`Fix memory leak in database connector`
74
+
-`Refactor logging system for clarity`
75
+
-`Update README with installation instructions`
76
+
-`Remove deprecated API calls`
77
+
78
+
#### Messages with long descriptions
79
+
80
+
```text
81
+
Fix rendering issue in graphics pipeline
82
+
83
+
The rendering pipeline had a bug causing frame drops on low-end GPUs. This fix optimizes shader execution and resolves the issue.
84
+
```
85
+
86
+
```text
87
+
Add unit tests for input validation
88
+
89
+
Unit tests cover edge cases for user input to ensure stability and prevent crashes during unexpected inputs.
90
+
```
91
+
92
+
## Common mistakes to avoid
93
+
94
+
-__Using tags or brackets:__
24
95
25
-
Regular commit message should consist of one part and be built according to the following template:
96
+
- Incorrect: `[Fix] Resolve bug in module`
97
+
- Correct: `Fix bug in module`
26
98
27
-
```test
28
-
Commit message body
99
+
-__Starting with a non-verb:__
29
100
30
-
Long description if necessary
31
-
```
101
+
- Incorrect: `Bugfix for network error`
102
+
- Correct: `Fix network error`
32
103
33
-
Commit message body and description should briefly reflect the meaning of the commit changes
104
+
-__Improper verb placement:__
34
105
35
-
Commit message body should be written starting with a capital letter
106
+
- Incorrect: `Implementing new feature`
107
+
- Correct: `Implement new feature`
36
108
37
-
First word should denote the verb of the action performed by the commit, this word should be in the infinitive form without the `to` particle
109
+
-__Using incomplete sentences:__
38
110
39
-
Description should be separated from the body by one empty line
111
+
- Incorrect: `Fixed bug`
112
+
- Correct: `Fix UI layout bug`
40
113
41
-
-Length
114
+
-__Improper noun placement:__
42
115
43
-
The maximum length of the commit header or the commit description line is 72 characters
Copy file name to clipboardExpand all lines: doc/commit-style.rus.md
+87-13Lines changed: 87 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,17 @@
8
8
9
9
В проекте принят стандарт фиксаций для обеспечения прозрачности и понимания вносимых изменений. Приемлемый стиль фиксаций описан ниже
10
10
11
-
## Именование
11
+
## Общие Правила
12
+
13
+
- Сообщения к коммитам должны быть написаны на английском языке
14
+
- Каждое сообщение должно отвечать на вопрос: __"Если этот коммит будет применён, он..."__
15
+
- Сообщение должно начинаться с глагола в инфинитиве без частицы `to`
16
+
- Никаких флагов, таких как `[Fix]`, `[UPDATE]` и т.п., использовать не нужно. Глагол должен чётко описывать выполненное действие
17
+
- Сообщение должно быть кратким, но информативным. При необходимости можно добавить дополнительное описание
18
+
- Первая буква сообщения должна быть заглавной
19
+
- Если вы не уверены, как написать на английском, напишите на своём родном языке, чётко описывая, что вы сделали (избегайте "бреда", мы переведём и доработаем сообщение)
20
+
21
+
## Структура Сообщений
12
22
13
23
### Начальные фиксации
14
24
@@ -20,24 +30,88 @@ Initial commit
20
30
21
31
### Рабочие фиксации
22
32
23
-
- Шаблон
33
+
Обычное сообщение о фиксации должно состоять из одной части и быть построено в соответствии со следующим шаблоном:
34
+
35
+
```text
36
+
<Основное сообщение коммита>
37
+
38
+
<Дополнительное описание, если необходимо>
39
+
```
40
+
41
+
### Ограничения по длине
42
+
43
+
- Максимальная длина заголовка сообщения коммита — __72 символа__
44
+
- Каждая строка в дополнительном описании также не должна превышать __72 символа__
45
+
46
+
## Правила Написания Сообщений
47
+
48
+
### Формат Заголовка
49
+
50
+
Сообщение коммита должно начинаться с глагола в инфинитиве, описывающего действие, выполненное в коммите. Примеры:
51
+
52
+
-`Fix window manager implementation`
53
+
-`Implement audio output support`
54
+
-`Remove obsolete configurations`
55
+
-`Add documentation for API endpoints`
56
+
-`Optimize rendering pipeline`
57
+
58
+
#### Особые правила для существительных
59
+
60
+
Если сообщение включает существительное, важно правильно разместить его, чтобы фраза звучала естественно:
61
+
62
+
-`Implement new devices support (предпочтительно)`
63
+
-`Add new gizmo support (предпочтительно)`
64
+
-`Add support for AMD FSR (нежелательно, используйте структуру выше)`
65
+
-`Implement support for new devices (нежелательно, переформулируйте как в примерах выше)`
66
+
67
+
Рекомендуется, чтобы основное существительное шло после уточнений, если это возможно, для лучшей читаемости
68
+
69
+
### Примеры корректных сообщений
70
+
71
+
#### Однострочные сообщения
72
+
73
+
-`Fix memory leak in database connector`
74
+
-`Refactor logging system for clarity`
75
+
-`Update README with installation instructions`
76
+
-`Remove deprecated API calls`
77
+
78
+
#### Сообщения с дополнительным описанием
79
+
80
+
```text
81
+
Fix rendering issue in graphics pipeline
82
+
83
+
The rendering pipeline had a bug causing frame drops on low-end GPUs. This fix optimizes shader execution and resolves the issue.
84
+
```
85
+
86
+
```text
87
+
Add unit tests for input validation
88
+
89
+
Unit tests cover edge cases for user input to ensure stability and prevent crashes during unexpected inputs.
90
+
```
91
+
92
+
## Типичные ошибки
93
+
94
+
-__Использование тегов или скобок:__
24
95
25
-
Обычное сообщение о фиксации должно состоять из одной части и быть построено в соответствии со следующим шаблоном:
96
+
- Некорректно: `[Fix] Resolve bug in module`
97
+
- Корректно: `Fix bug in module`
26
98
27
-
```test
28
-
Тело сообщения фиксации
99
+
-__Начало не с глагола:__
29
100
30
-
Длинное описание, если необходимо
31
-
```
101
+
- Некорректно: `Bugfix for network error`
102
+
- Корректно: `Fix network error`
32
103
33
-
Текст сообщения о фиксации и описание должны кратко отражать смысл изменений, внесенных при фиксации
104
+
-__Неправильное использование глаголов:__
34
105
35
-
Текст сообщения о фиксации должен начинаться с заглавной буквы
106
+
- Некорректно: `Implementing new feature`
107
+
- Корректно: `Implement new feature`
36
108
37
-
Первое слово должно обозначать глагол действия, выполняемого коммитом, это слово должно быть в форме инфинитива без частицы `to`
109
+
-__Неполные предложения:__
38
110
39
-
Описание должно быть отделено от основного текста одной пустой строкой
111
+
- Некорректно: `Fixed bug`
112
+
- Корректно: `Fix UI layout bug`
40
113
41
-
-Длина
114
+
-__Неверное расположение существительного:__
42
115
43
-
Максимальная длина заголовка фиксации или строки описания фиксации составляет 72 символа
0 commit comments