Skip to content

Commit fcccf63

Browse files
committed
Add Development group, contains CHANGELOG and DevGuideline
1 parent 9e1cd4c commit fcccf63

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

DevGuideline.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
//
2+
// DevGuideline
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+
*/
18+
19+
1. 提交代码之前,请务必先保证在真机、模拟器上通过所有的测试用例(Debug+Release模式)
20+
21+
2. 命名规范
22+
① 给模型类型、系统自带类型,扩展public的成员
23+
- obj.kj.成员名称
24+
- 比如 "123".kj.numberCount, model.kj.JSON()
25+
26+
② 给模型类型、系统自带类型,扩展internal的成员
27+
- obj.kj_成员名称
28+
- 比如 "123".kj_numberCount, model.kj_JSON()
29+
30+
③ private\fileprivate的成员
31+
- obj._成员名称
32+
- 比如 "123"._numberCount, model._JSON()
33+
34+
④ 类型名、方法名必须是大写的`JSON`
35+
- 不要写`json`, 也不要写`Json`
36+
- 如果是变量名、常量名、参数名,可以用小写`json`
37+
38+
/**********************************************************/
39+
40+
1. Please make all test cases right before pushing your code
41+
- include iOS Device\Simulator
42+
- include release\debug mode
43+
44+
2. NamingConvention
45+
① public extension for system types, model types
46+
- obj.kj.memberName
47+
- e.g. "123".kj.numberCount, model.kj.JSON()
48+
49+
② internal extension for system types, model types
50+
- obj.kj_memberName
51+
- e.g. "123".kj_numberCount, model.kj_JSON()
52+
53+
③ private\fileprivate
54+
- obj._memberName
55+
- e.g. "123"._numberCount, model._JSON()
56+
57+
④ Name of method or type must be `JSON`
58+
- not `json`, not `Json`
59+
- name of variable can be `json`

KakaJSON.xcodeproj/project.pbxproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@
170170
627B5E852320EC760046E23D /* JTM_04_ModelArray.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JTM_04_ModelArray.swift; sourceTree = "<group>"; };
171171
627B5E862320EC760046E23D /* JTM_03_NestedModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JTM_03_NestedModel.swift; sourceTree = "<group>"; };
172172
627B5E972320F08F0046E23D /* KakaJSON.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = KakaJSON.podspec; sourceTree = "<group>"; };
173+
627B5E992320F2710046E23D /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = "<group>"; };
174+
627B5E9A2320F2D40046E23D /* DevGuideline.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = DevGuideline.md; sourceTree = "<group>"; };
173175
"KakaJSON::KakaJSON::Product" /* KakaJSON.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = KakaJSON.framework; sourceTree = BUILT_PRODUCTS_DIR; };
174176
"KakaJSON::KakaJSONTests::Product" /* KakaJSONTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; path = KakaJSONTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
175177
OBJ_13 /* XCTestManifests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XCTestManifests.swift; sourceTree = "<group>"; };
@@ -340,6 +342,15 @@
340342
name = Deployment;
341343
sourceTree = "<group>";
342344
};
345+
627B5E982320F2580046E23D /* Development */ = {
346+
isa = PBXGroup;
347+
children = (
348+
627B5E992320F2710046E23D /* CHANGELOG.md */,
349+
627B5E9A2320F2D40046E23D /* DevGuideline.md */,
350+
);
351+
name = Development;
352+
sourceTree = "<group>";
353+
};
343354
OBJ_10 /* Tests */ = {
344355
isa = PBXGroup;
345356
children = (
@@ -372,6 +383,7 @@
372383
OBJ_5 = {
373384
isa = PBXGroup;
374385
children = (
386+
627B5E982320F2580046E23D /* Development */,
375387
627B5E962320F06E0046E23D /* Deployment */,
376388
OBJ_7 /* Sources */,
377389
OBJ_10 /* Tests */,

0 commit comments

Comments
 (0)