Skip to content

Commit da84fbc

Browse files
committed
README
1 parent 2ffc95b commit da84fbc

File tree

4 files changed

+170
-0
lines changed

4 files changed

+170
-0
lines changed

.clang-format

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Copyright (c) 2015-present, Parse, LLC.
2+
# All rights reserved.
3+
#
4+
# This source code is licensed under the BSD-style license found in the
5+
# LICENSE file in the root directory of this source tree. An additional grant
6+
# of patent rights can be found in the PATENTS file in the same directory.
7+
8+
---
9+
Language: Cpp
10+
BasedOnStyle: LLVM
11+
AccessModifierOffset: -2
12+
AlignAfterOpenBracket: true
13+
AlignEscapedNewlinesLeft: true
14+
AlignOperands: true
15+
AlignTrailingComments: false
16+
AllowAllParametersOfDeclarationOnNextLine: false
17+
AllowShortBlocksOnASingleLine: false
18+
AllowShortCaseLabelsOnASingleLine: false
19+
AllowShortIfStatementsOnASingleLine: true
20+
AllowShortLoopsOnASingleLine: false
21+
AllowShortFunctionsOnASingleLine: false
22+
AlwaysBreakAfterDefinitionReturnType: false
23+
AlwaysBreakTemplateDeclarations: false
24+
AlwaysBreakBeforeMultilineStrings: false
25+
BreakBeforeBinaryOperators: None
26+
BreakBeforeTernaryOperators: true
27+
BreakConstructorInitializersBeforeComma: true
28+
BinPackParameters: true
29+
BinPackArguments: true
30+
ColumnLimit: 0
31+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
32+
ConstructorInitializerIndentWidth: 4
33+
DerivePointerAlignment: true
34+
ExperimentalAutoDetectBinPacking: true
35+
IndentCaseLabels: true
36+
IndentWrappedFunctionNames: true
37+
IndentFunctionDeclarationAfterType: true
38+
MaxEmptyLinesToKeep: 1
39+
KeepEmptyLinesAtTheStartOfBlocks: true
40+
NamespaceIndentation: None
41+
ObjCBlockIndentWidth: 4
42+
ObjCSpaceAfterProperty: true
43+
ObjCSpaceBeforeProtocolList: true
44+
PenaltyBreakBeforeFirstCallParameter: 19
45+
PenaltyBreakComment: 300
46+
PenaltyBreakString: 1000
47+
PenaltyBreakFirstLessLess: 140
48+
PenaltyExcessCharacter: 1000000
49+
PenaltyReturnTypeOnItsOwnLine: 120
50+
PointerAlignment: Right
51+
SpacesBeforeTrailingComments: 1
52+
Cpp11BracedListStyle: true
53+
Standard: Cpp11
54+
IndentWidth: 4
55+
TabWidth: 4
56+
UseTab: Never
57+
BreakBeforeBraces: Attach
58+
SpacesInParentheses: false
59+
SpacesInSquareBrackets: false
60+
SpacesInAngles: false
61+
SpaceInEmptyParentheses: false
62+
SpacesInCStyleCastParentheses: false
63+
SpaceAfterCStyleCast: false
64+
SpacesInContainerLiterals: true
65+
SpaceBeforeAssignmentOperators: true
66+
ContinuationIndentWidth: 4
67+
CommentPragmas: '^ IWYU pragma:'
68+
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
69+
SpaceBeforeParens: ControlStatements
70+
DisableFormat: false
71+
...

Contributing.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# 贡献代码指南
2+
3+
我们非常欢迎大家来贡献代码,我们会向贡献者致以最诚挚的敬意。
4+
5+
一般可以通过在Github上提交[Pull Request](https://github.com/qiniu/iOS-netdiag)来贡献代码。
6+
7+
## Pull Request要求
8+
9+
- **代码规范** 参考 https://github.com/NYTimes/objective-c-style-guide。
10+
11+
- **代码格式** 提交前请使用Xcode格式化插件 clang format 默认风格进行格式化。
12+
13+
- **必须添加测试!** - 如果没有测试(单元测试、集成测试都可以),那么提交的补丁是不会通过的。
14+
15+
- **记得更新文档** - 保证`README.md`以及其他相关文档及时更新,和代码的变更保持一致性。
16+
17+
- **考虑我们的发布周期** - 我们的版本号会服从[SemVer v2.0.0](http://semver.org/),我们绝对不会随意变更对外的API。
18+
19+
- **创建feature分支** - 最好不要从你的master分支提交 pull request。
20+
21+
- **一个feature提交一个pull请求** - 如果你的代码变更了多个操作,那就提交多个pull请求吧。
22+
23+
- **清晰的commit历史** - 保证你的pull请求的每次commit操作都是有意义的。如果你开发中需要执行多次的即时commit操作,那么请把它们放到一起再提交pull请求。
24+
25+
## 运行测试
26+
27+
``` bash
28+
$ xctool -workspace NetDiag.xcworkspace -scheme NetDiagTests build test -sdk iphonesimulator
29+
```

README.md

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Network Diagnosis for Objective-C
2+
3+
[![@qiniu on weibo](http://img.shields.io/badge/weibo-%40qiniutek-blue.svg)](http://weibo.com/qiniutek)
4+
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE.md)
5+
[![Build Status](https://travis-ci.org/qiniu/iOS-netdiag.svg?branch=master)](https://travis-ci.org/qiniu/iOS-netdiag)
6+
[![Latest Stable Version](http://img.shields.io/cocoapods/v/QNNetDiag.svg)](https://github.com/qiniu/iOS-netdiag/releases)
7+
![Platform](http://img.shields.io/cocoapods/p/QNNetDiag.svg)
8+
9+
## 用途
10+
11+
网络诊断SDK,支持Ping/TcpPing/Rtmp/TraceRoute/DNS/外部IP/外部DNS。
12+
13+
## 安装
14+
15+
通过CocoaPods
16+
17+
```ruby
18+
pod "QNNetDiag"
19+
```
20+
21+
## 运行环境
22+
23+
24+
## 使用方法
25+
26+
27+
## 测试
28+
29+
30+
### 所有测试
31+
32+
``` bash
33+
$ xctool -workspace NetDiag.xcworkspace -scheme NetDiagTests build test -sdk iphonesimulator
34+
```
35+
36+
### 指定测试
37+
38+
可以在单元测试上修改,熟悉使用
39+
40+
``` bash
41+
```
42+
43+
## 常见问题
44+
45+
- 如果碰到其他编译错误,请参考 Cocoapods 的 [troubleshooting](http://guides.cocoapods.org/using/troubleshooting.html)
46+
47+
## 代码贡献
48+
49+
详情参考[代码提交指南](https://github.com/qiniu/iOS-netdiag/blob/master/CONTRIBUTING.md)
50+
51+
## 贡献记录
52+
53+
- [所有贡献者](https://github.com/qiniu/iOS-netdiag/contributors)
54+
55+
## 联系我们
56+
57+
- 如果有什么问题,可以到问答社区提问,[问答社区](http://qiniu.segmentfault.com/)
58+
- 如果发现了bug, 欢迎提交 [issue](https://github.com/qiniu/iOS-netdiag/issues)
59+
- 如果有功能需求,欢迎提交 [issue](https://github.com/qiniu/iOS-netdiag/issues)
60+
- 如果要提交代码,欢迎提交 pull request
61+
- 欢迎关注我们的[微信](http://www.qiniu.com/#weixin) [微博](http://weibo.com/qiniutek),及时获取动态信息。
62+
63+
## 代码许可
64+
65+
The MIT License (MIT).详情见 [License文件](https://github.com/qiniu/iOS-netdiag/blob/master/LICENSE).

format.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
# Change this if your clang-format executable is somewhere else
3+
CLANG_FORMAT="$HOME/Library/Application Support/Alcatraz/Plug-ins/ClangFormat/bin/clang-format"
4+
5+
find . \( -name '*.h' -or -name '*.m' -or -name '*.mm' \) -print0 | xargs -0 "$CLANG_FORMAT" -i

0 commit comments

Comments
 (0)