From 18e2aaf4014c8f3cfce670d530269ca0456c246d Mon Sep 17 00:00:00 2001 From: Pavel Kosov Date: Thu, 13 Apr 2023 13:38:17 +0300 Subject: [PATCH] [doc] Add description for commit messages and title Add rules for commit messages and title to avoid using uninformative descriptions which makes commit history unclear Signed-off-by: Pavel Kosov --- OpenHarmonyDevelopmentGuidelines.md | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/OpenHarmonyDevelopmentGuidelines.md b/OpenHarmonyDevelopmentGuidelines.md index c287aa37cec5..03c5f62e21a9 100644 --- a/OpenHarmonyDevelopmentGuidelines.md +++ b/OpenHarmonyDevelopmentGuidelines.md @@ -18,6 +18,13 @@ All OHOS-related changes to mainline LLVM / clang code MUST be clearly marked su unsigned LoopSizeThreshold = 32; // OHOS_LOCAL ``` +or + +``` +// OHOS_LOCAL +unsigned LoopSizeThreshold = Really(Long()).LineOfExtremely()->NecessaryCode(); +``` + or in case of multiline change: ``` @@ -32,6 +39,32 @@ The presence of such marks greatly simplifies porting such code snippets to new --------------------- +### Commit title and message + +Commit title and message should be in English. + +Commit title should starts with tag in brackets (name of changed component), e.g.: + +``` +[lldb] Add support for backward debugging +``` + +or, in case of several components: + +``` +[lldb][mips][test] Add tests for support for backward debugging on MIPS +``` + +Commit message should briefly describe **how** it is achieved, e.g.: + +``` +[lldb] Add support for backward debugging + +To support backward steps, auxiliary information is stored in SomeUsefulComponent +``` + +--------------------- + ### ABI Breakage All ABI-breaking changes MUST be scheduled to a major toolchain releases. One should explicitly discuss and document such changes. Ideally ABI-breaking change should cause linking error, it should not cause silent and hard to track bugs. -- Gitee