|
1 | | -// |
2 | | -// DevGuideline.md |
3 | | -// KakaJSON |
4 | | -// |
5 | | -// Created by MJ Lee on 2019/8/14. |
6 | | -// Copyright © 2019 MJ Lee. All rights reserved. |
7 | | -// |
8 | | - |
9 | | -/* |
10 | | - Metadata Reference: |
11 | | - 0. https://github.com/apple/swift/blob/master/docs/ABI/TypeMetadata.rst |
12 | | - 1. https://github.com/apple/swift/blob/master/include/swift/ABI/MetadataKind.def |
13 | | - 2. https://github.com/apple/swift/blob/master/include/swift/ABI/Metadata.h |
14 | | - 3. https://github.com/apple/swift/blob/master/include/swift/ABI/MetadataValues.h |
15 | | - 4. https://github.com/apple/swift/blob/master/utils/dtrace/runtime.d |
16 | | - 5. https://github.com/apple/swift/blob/master/include/swift/Reflection/Records.h |
17 | | - */ |
| 1 | + |
| 2 | +## KakaJSON DevGuideline |
| 3 | + |
| 4 | +#### Metadata Reference: |
| 5 | + |
| 6 | +- [https://github.com/apple/swift/blob/master/docs/ABI/TypeMetadata.rst](https://github.com/apple/swift/blob/master/docs/ABI/TypeMetadata.rst) |
| 7 | +- [https://github.com/apple/swift/blob/master/include/swift/ABI/MetadataKind.def](https://github.com/apple/swift/blob/master/include/swift/ABI/MetadataKind.def) |
| 8 | +- [https://github.com/apple/swift/blob/master/include/swift/ABI/Metadata.h](https://github.com/apple/swift/blob/master/include/swift/ABI/Metadata.h) |
| 9 | +- [https://github.com/apple/swift/blob/master/include/swift/ABI/MetadataValues.h](https://github.com/apple/swift/blob/master/include/swift/ABI/MetadataValues.h) |
| 10 | +- [https://github.com/apple/swift/blob/master/utils/dtrace/runtime.d](https://github.com/apple/swift/blob/master/utils/dtrace/runtime.d) |
| 11 | +- [https://github.com/apple/swift/blob/master/include/swift/Reflection/Records.h](https://github.com/apple/swift/blob/master/include/swift/Reflection/Records.h) |
| 12 | + |
| 13 | +#### 通过测试用例 |
| 14 | + |
| 15 | +提交代码之前,请务必先保证在真机、模拟器上通过所有的测试用例(Debug+Release模式) |
18 | 16 |
|
19 | 17 | 1. 提交代码之前,请务必先保证在真机、模拟器上通过所有的测试用例(Debug+Release模式) |
20 | 18 |
|
21 | | -2. 命名规范 |
| 19 | +#### 命名规范 |
| 20 | + |
22 | 21 | ① 给模型类型、系统自带类型,扩展public的成员 |
23 | 22 | - obj.kj.成员名称 |
24 | 23 | - 比如 "123".kj.numberCount, model.kj.JSON() |
|
35 | 34 | - 不要写`json`, 也不要写`Json` |
36 | 35 | - 如果是变量名、常量名、参数名,可以用小写`json` |
37 | 36 |
|
38 | | -/**********************************************************/ |
| 37 | +---------------------------------------------------------------------------- |
39 | 38 |
|
40 | | -1. Please make all test cases right before pushing your code |
| 39 | +#### TestPass |
| 40 | + |
| 41 | + Please make all test cases right before pushing your code |
41 | 42 | - include iOS Device\Simulator |
42 | 43 | - include release\debug mode |
43 | 44 |
|
44 | | -2. NamingConvention |
| 45 | +#### NamingConvention |
| 46 | + |
45 | 47 | ① public extension for system types、model types |
46 | 48 | - obj.kj.memberName |
47 | 49 | - e.g. "123".kj.numberCount, model.kj.JSON() |
|
0 commit comments