开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
文件
master
分支 (54)
标签 (330)
master
wip-yuriw-release-15.2.15-master
revert-43485-fix-pr_triage-master
wip-rgw-multisite-reshard
pacific
octopus
feature-48388-cache
wip-github_pr_template-master
mimic
wip-rgw-zipper-standalone
wip-rgw-multisite-reshard-prebase-2021年09月27日
nautilus
wip-yuriw-pacific-16.2.6-RN_2
e2e-script-documentation
wip-sjust-testing
wip-rgw-multisite-resharc-prebase-2021年08月24日
ljflores-patch-2
ses7
wip-s3select-parquet-object-processing-2
ljflores-patch-1
v16.2.6
v15.2.14
v16.2.5
v14.2.22
v15.2.13
v15.2.12
v14.2.21
v16.2.4
v16.2.3
v16.2.2
v14.2.20
v16.2.1
v15.2.11
v16.2.0
v14.2.19
v15.2.10
v14.2.18
v14.2.17
v15.2.9
v16.1.0
master
分支 (54)
标签 (330)
master
wip-yuriw-release-15.2.15-master
revert-43485-fix-pr_triage-master
wip-rgw-multisite-reshard
pacific
octopus
feature-48388-cache
wip-github_pr_template-master
mimic
wip-rgw-zipper-standalone
wip-rgw-multisite-reshard-prebase-2021年09月27日
nautilus
wip-yuriw-pacific-16.2.6-RN_2
e2e-script-documentation
wip-sjust-testing
wip-rgw-multisite-resharc-prebase-2021年08月24日
ljflores-patch-2
ses7
wip-s3select-parquet-object-processing-2
ljflores-patch-1
v16.2.6
v15.2.14
v16.2.5
v14.2.22
v15.2.13
v15.2.12
v14.2.21
v16.2.4
v16.2.3
v16.2.2
v14.2.20
v16.2.1
v15.2.11
v16.2.0
v14.2.19
v15.2.10
v14.2.18
v14.2.17
v15.2.9
v16.1.0
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
master
分支 (54)
标签 (330)
master
wip-yuriw-release-15.2.15-master
revert-43485-fix-pr_triage-master
wip-rgw-multisite-reshard
pacific
octopus
feature-48388-cache
wip-github_pr_template-master
mimic
wip-rgw-zipper-standalone
wip-rgw-multisite-reshard-prebase-2021年09月27日
nautilus
wip-yuriw-pacific-16.2.6-RN_2
e2e-script-documentation
wip-sjust-testing
wip-rgw-multisite-resharc-prebase-2021年08月24日
ljflores-patch-2
ses7
wip-s3select-parquet-object-processing-2
ljflores-patch-1
v16.2.6
v15.2.14
v16.2.5
v14.2.22
v15.2.13
v15.2.12
v14.2.21
v16.2.4
v16.2.3
v16.2.2
v14.2.20
v16.2.1
v15.2.11
v16.2.0
v14.2.19
v15.2.10
v14.2.18
v14.2.17
v15.2.9
v16.1.0
ceph
/
CodingStyle
ceph
/
CodingStyle
CodingStyle 3.95 KB
一键复制 编辑 原始数据 按行查看 历史
Ponnuvel Palaniyappan 提交于 2020年02月07日 23:55 +08:00 . coding-style: update a link and fix typos.
Ceph Coding style
-----------------
Coding style is most important for new code and (to a lesser extent)
revised code. It is not worth the churn to simply reformat old code.
C code
------
For C code, we conform by the Linux kernel coding standards:
https://www.kernel.org/doc/Documentation/process/coding-style.rst
C++ code
--------
For C++ code, things are a bit more complex. As a baseline, we use Google's
coding guide:
https://google.github.io/styleguide/cppguide.html
As an addendum to the above, we add the following guidelines, organized
by section.
* Naming > Type Names:
Google uses CamelCaps for all type names. We use two naming schemes:
- for naked structs (simple data containers), lower case with _t.
Yes, _t also means typedef. It's perhaps not ideal.
struct my_type_t {
int a = 0, b = 0;
void encode(...) ...
...
};
- for full-blown classes, CamelCaps, private: section, accessors,
probably not copyable, etc.
* Naming > Variable Names:
Google uses _ suffix for class members. That's ugly. We'll use
a m_ prefix, like so, or none at all.
class Foo {
public:
int get_foo() const { return m_foo; }
void set_foo(int foo) { m_foo = foo; }
private:
int m_foo;
};
* Naming > Constant Names:
Google uses kSomeThing for constants. We prefer SOME_THING.
* Naming > Function Names:
Google uses CamelCaps. We use_function_names_with_underscores().
Accessors are the same, {get,set}_field().
* Naming > Enumerator Names:
Name them like constants, as above (SOME_THING).
* Comments > File Comments:
Don't sweat it, unless the license varies from that of the project
(LGPL2.1 or LGPL3.0) or the code origin isn't reflected by the git history.
* Formatting > Tabs:
Indent width is two spaces. When runs of 8 spaces can be compressed
to a single tab character, do so. The standard Emacs/Vim settings
header is:
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
* Formatting > Conditionals:
- No spaces inside conditionals please, e.g.
if (foo) { // okay
if ( foo ) { // no
- Always use newline following if, and use braces:
if (foo) {
bar; // like this, even for a one-liner
}
if (foo)
bar; // no, usually harder to parse visually
if (foo) bar; // no
if (foo) { bar; } // definitely no
* Header Files -> The `#define` Guard:
`#pragma once` is allowed for simplicity at the expense of
portability since `#pragma once` is widely supported and is known
to work on GCC and Clang.
The following guidelines have not been followed in the legacy code,
but are worth mentioning and should be followed strictly for new code:
* Header Files > Function Parameter Ordering:
Inputs, then outputs.
* Classes > Explicit Constructors:
You should normally mark constructors explicit to avoid getting silent
type conversions.
* Classes > Copy Constructors:
- Use defaults for basic struct-style data objects.
- Most other classes should DISALLOW_COPY_AND_ASSIGN.
- In rare cases we can define a proper copy constructor and operator=.
* Other C++ Features > Reference Arguments:
Only use const references. Use pointers for output arguments.
* Other C++ Features > Avoid Default Arguments:
They obscure the interface.
Python code
-----------
For new python code, PEP-8 should be observed:
https://www.python.org/dev/peps/pep-0008/
Existing code can be refactored to adhere to PEP-8, and cleanups are welcome.
JavaScript / TypeScript
-----------------------
For Angular code, we follow the official Angular style guide:
https://angular.io/guide/styleguide
To check whether your code is conformant with the style guide, we use a
combination of TSLint, Codelyzer and Prettier:
https://palantir.github.io/tslint/
http://codelyzer.com/
https://prettier.io/
Loading...
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

ceph
暂无标签
GPL-2.0
使用 GPL-2.0 开源许可协议
, LGPL-2.1
使用 LGPL-2.1 开源许可协议
, LGPL-3.0
使用 LGPL-3.0 开源许可协议
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/open_source_reference/ceph.git
git@gitee.com:open_source_reference/ceph.git
open_source_reference
ceph
ceph
master
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /