Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
longbai committed Feb 17, 2016
1 parent 2ffc95b commit da84fbc
Show file tree
Hide file tree
Showing 4 changed files with 170 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Copyright (c) 2015-present, Parse, LLC.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.

---
Language: Cpp
BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: true
AlignEscapedNewlinesLeft: true
AlignOperands: true
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: false
AlwaysBreakTemplateDeclarations: false
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
BinPackParameters: true
BinPackArguments: true
ColumnLimit: 0
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
DerivePointerAlignment: true
ExperimentalAutoDetectBinPacking: true
IndentCaseLabels: true
IndentWrappedFunctionNames: true
IndentFunctionDeclarationAfterType: true
MaxEmptyLinesToKeep: 1
KeepEmptyLinesAtTheStartOfBlocks: true
NamespaceIndentation: None
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 140
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 120
PointerAlignment: Right
SpacesBeforeTrailingComments: 1
Cpp11BracedListStyle: true
Standard: Cpp11
IndentWidth: 4
TabWidth: 4
UseTab: Never
BreakBeforeBraces: Attach
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpacesInAngles: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpaceAfterCStyleCast: false
SpacesInContainerLiterals: true
SpaceBeforeAssignmentOperators: true
ContinuationIndentWidth: 4
CommentPragmas: '^ IWYU pragma:'
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
SpaceBeforeParens: ControlStatements
DisableFormat: false
...
29 changes: 29 additions & 0 deletions Contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 贡献代码指南

我们非常欢迎大家来贡献代码,我们会向贡献者致以最诚挚的敬意。

一般可以通过在Github上提交[Pull Request](https://github.com/qiniu/iOS-netdiag)来贡献代码。

## Pull Request要求

- **代码规范** 参考 https://github.com/NYTimes/objective-c-style-guide。

- **代码格式** 提交前请使用Xcode格式化插件 clang format 默认风格进行格式化。

- **必须添加测试!** - 如果没有测试(单元测试、集成测试都可以),那么提交的补丁是不会通过的。

- **记得更新文档** - 保证`README.md`以及其他相关文档及时更新,和代码的变更保持一致性。

- **考虑我们的发布周期** - 我们的版本号会服从[SemVer v2.0.0](http://semver.org/),我们绝对不会随意变更对外的API。

- **创建feature分支** - 最好不要从你的master分支提交 pull request。

- **一个feature提交一个pull请求** - 如果你的代码变更了多个操作,那就提交多个pull请求吧。

- **清晰的commit历史** - 保证你的pull请求的每次commit操作都是有意义的。如果你开发中需要执行多次的即时commit操作,那么请把它们放到一起再提交pull请求。

## 运行测试

``` bash
$ xctool -workspace NetDiag.xcworkspace -scheme NetDiagTests build test -sdk iphonesimulator
```
65 changes: 65 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Network Diagnosis for Objective-C

[![@qiniu on weibo](http://img.shields.io/badge/weibo-%40qiniutek-blue.svg)](http://weibo.com/qiniutek)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE.md)
[![Build Status](https://travis-ci.org/qiniu/iOS-netdiag.svg?branch=master)](https://travis-ci.org/qiniu/iOS-netdiag)
[![Latest Stable Version](http://img.shields.io/cocoapods/v/QNNetDiag.svg)](https://github.com/qiniu/iOS-netdiag/releases)
![Platform](http://img.shields.io/cocoapods/p/QNNetDiag.svg)

## 用途

网络诊断SDK,支持Ping/TcpPing/Rtmp/TraceRoute/DNS/外部IP/外部DNS。

## 安装

通过CocoaPods

```ruby
pod "QNNetDiag"
```

## 运行环境


## 使用方法


## 测试


### 所有测试

``` bash
$ xctool -workspace NetDiag.xcworkspace -scheme NetDiagTests build test -sdk iphonesimulator
```

### 指定测试

可以在单元测试上修改,熟悉使用

``` bash
```

## 常见问题

- 如果碰到其他编译错误,请参考 Cocoapods 的 [troubleshooting](http://guides.cocoapods.org/using/troubleshooting.html)

## 代码贡献

详情参考[代码提交指南](https://github.com/qiniu/iOS-netdiag/blob/master/CONTRIBUTING.md)

## 贡献记录

- [所有贡献者](https://github.com/qiniu/iOS-netdiag/contributors)

## 联系我们

- 如果有什么问题,可以到问答社区提问,[问答社区](http://qiniu.segmentfault.com/)
- 如果发现了bug, 欢迎提交 [issue](https://github.com/qiniu/iOS-netdiag/issues)
- 如果有功能需求,欢迎提交 [issue](https://github.com/qiniu/iOS-netdiag/issues)
- 如果要提交代码,欢迎提交 pull request
- 欢迎关注我们的[微信](http://www.qiniu.com/#weixin) [微博](http://weibo.com/qiniutek),及时获取动态信息。

## 代码许可

The MIT License (MIT).详情见 [License文件](https://github.com/qiniu/iOS-netdiag/blob/master/LICENSE).
5 changes: 5 additions & 0 deletions format.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
# Change this if your clang-format executable is somewhere else
CLANG_FORMAT="$HOME/Library/Application Support/Alcatraz/Plug-ins/ClangFormat/bin/clang-format"

find . \( -name '*.h' -or -name '*.m' -or -name '*.mm' \) -print0 | xargs -0 "$CLANG_FORMAT" -i

0 comments on commit da84fbc

Please sign in to comment.