【编码规范】编码规范(linux内核编码规范、C编码规范、java编程规范……)

谷歌C++编码规范

https://download.csdn.net/download/chengbozhang/10318894

1 保持一致也非常重要,如果你在一个文件中新加的代码和原有代码风格相去甚远的话,这就破坏了文件本身的整体美观也影响阅读,所以要尽量避免。

2 一些条目往往有例外,比如下面这些,所以本图不能代替文档,有时间还是把PDF认真阅读一遍吧。

    异常在测试框架中确实很好用

    RTTI在某些单元测试中非常有用

    在记录日志时可以使用流

    操作符重载 不提倡使用,有些STL 算法确实需要重载operator==时可以这么做。

3 如果觉得这图不错,帮我顶下。

注:原图较大,在新标签页中打开或保存到本地打开更清晰

(摘自:https://blog.csdn.net/voidccc/article/details/37599203)

linux内核编码规范

《Linux 内核代码风格--Kernel Coding Style(持续更新-20170616)》:https://blog.csdn.net/gatieme/article/details/73323115

GITHUB:https://github.com/gatieme/LDD-LinuxDeviceDrivers/tree/master/study/pattern/code_style

《linux内核代码风格(中文)》:https://blog.csdn.net/chrisniu1984/article/details/6619723

当前基于Linux Kernel V4.11.5

英文原版

参见内核文档 Documentation/process/coding-style.rst

英文原版 : https://www.kernel.org/doc/Documentation/process/coding-style.rst

官方译文

参见内核文档 Documentation/translations/zh_CN/coding-style.rst

或者 translations/zh_CN/coding-style.html

内核文档:https://www.kernel.org/doc/Documentation/translations/zh_CN/coding-style.rst 
或者 http://elixir.free-electrons.com/linux/latest/source/Documentation/translations/zh_CN/coding-style.rst

阿里JAVA编程规范

https://github.com/alibaba/p3c

https://download.csdn.net/download/cfreezhan/10179930

阿里代码规范设置https://blog.csdn.net/byzh4/article/details/79478494


 

猜你喜欢

转载自blog.csdn.net/bandaoyu/article/details/91129306