编码规范
小于 1 分钟
reference
- Google Style Guides : Google 开源项目风格指南
- 中文技术文档的写作规范 - 阮一峰
- 代码安全指南
- awesome-comment : 神级注释
- Objective-C开发编码规范
- 中文版 Apple 官方 Swift 文档《API Design Guidelines》
- Airbnb JavaScript编码规范指南
- JavaScript Standard Style
🌟 JavaScript Style Guide, with linter & automatic code fixer
- clean-code-javascript
🛁 Clean Code concepts adapted for JavaScript
Python
$ pip install pylint # 安装 pylint
$ pylint --generate-rcfile > .pylintrc # 生成 .pylintrc 文件
| Type | Public | Internal |
|---|---|---|
| Modules | lower_with_under | _lower_with_under |
| Packages | lower_with_under | |
| Classes | CapWords | _CapWords |
| Exceptions | CapWords | |
| Functions | lower_with_under() | _lower_with_under() |
| Global/Class Constants | CAPS_WITH_UNDER | _CAPS_WITH_UNDER |
| Global/Class Variables | lower_with_under | _lower_with_under |
| Instance Variables | lower_with_under | _lower_with_under (protected) or __lower_with_under(private) |
| Method Names | lower_with_under() | _lower_with_under() (protected) or __lower_with_under(private) |
| Function/Method Parameters | lower_with_under | |
| Local Variables | lower_with_under |
C/C++
| Type | Public |
|---|---|
| Files | my_userful_class.cc |
| Classes | MyExcitingClass / MyExcitingEnum |
| Variables | table_name |
| Instance Variables | table_name_ |
| Constants | kDaysInAWeek |
| Functions | MyExcitingMethod() |