Browse Source

doc: update commit requirements

* README-hacking (Requirements): Enhance phrasing.
(Commit log requirements): Rename to "Commit requirements",
describe "absence of whitespace errors" requirement, add references
to the Linux kernel coding style and scripts/checkpatch.pl script.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
Eugene Syromyatnikov 1 year ago
parent
commit
87869b3ac2
1 changed files with 20 additions and 4 deletions
  1. 20
    4
      README-hacking

+ 20
- 4
README-hacking View File

@@ -1,6 +1,7 @@
1 1
 Requirements
2 2
 ============
3
-If you use the GIT version of strace, please refer to INSTALL-git.md file.
3
+If you use a GIT version of strace source code, please refer to
4
+INSTALL-git.md file for building and installation instructions.
4 5
 
5 6
 
6 7
 No more ChangeLog file
@@ -13,13 +14,28 @@ the top-level ChangeLog file from logs at "make dist" time.  As such,
13 14
 there are strict requirements on the form of the commit log messages.
14 15
 
15 16
 
16
-Commit log requirements
17
-=======================
18
-Each commit log should always start with a one-line summary, the second
17
+Commit requirements
18
+===================
19
+Each commit message should always start with a one-line summary, the second
19 20
 line should be blank, and the remaining lines are usually ChangeLog-style
20 21
 entries for all affected files, except the leading TABs which should
21 22
 be omitted.
22 23
 
24
+Changes must not introduce whitespace errors in git sense (trailing
25
+whitespace, spaces before tabs, spaces for indentation, blank lines
26
+at the end of file), this can be checked with the following command:
27
+
28
+	git -c core.whitespace=space-before-tab,trailing-space diff-index \
29
+		--check 4b825dc642cb6eb9a060e54bf8d69288fbee4904
30
+
31
+It is also preferred (but not required) that commit patches pass
32
+scripts/checkpatch.pl script from the Linux kernel[1], as currently established
33
+coding style quite closely resembles the one used in Linux kernel[2], with some
34
+exceptions.
35
+
36
+[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/scripts/checkpatch.pl
37
+[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/process/coding-style.rst
38
+
23 39
 
24 40
 Documentation
25 41
 =============

Loading…
Cancel
Save