【编码规范】编码规范(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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值