mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-09 12:08:30 +00:00
doc: update coding guidelines
- add a rule for function parameter limit Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
This commit is contained in:
parent
62d0088565
commit
76017ec67f
@ -1079,6 +1079,26 @@ Compliant example::
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
C-FN-20: Each function shall have at most 6 parameters
|
||||||
|
======================================================
|
||||||
|
|
||||||
|
Compliant example::
|
||||||
|
|
||||||
|
void func_showcase(uint32_t param_1, uint32_t param_2, uint32_t param_3,
|
||||||
|
uint32_t param_4, uint32_t param_5, uint32_t param_6) {
|
||||||
|
...
|
||||||
|
}
|
||||||
|
|
||||||
|
.. rst-class:: non-compliant-code
|
||||||
|
|
||||||
|
Non-compliant example::
|
||||||
|
|
||||||
|
void func_showcase(uint32_t param_1, uint32_t param_2, uint32_t param_3,
|
||||||
|
uint32_t param_4, uint32_t param_5, uint32_t param_6,
|
||||||
|
uint32_t param_7) {
|
||||||
|
...
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Statements
|
Statements
|
||||||
**********
|
**********
|
||||||
|
Loading…
Reference in New Issue
Block a user