Skip to content

Commit fc1702c

Browse files
authored
Merge pull request #75 from naipaka/release/1.0.0
Release/1.0.0
2 parents 6b9abbb + 323b5ca commit fc1702c

File tree

81 files changed

+3939
-49
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+3939
-49
lines changed

.github/workflows/main.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
paths-ignore:
9+
- README.md
10+
pull_request:
11+
branches:
12+
- develop
13+
14+
env:
15+
DEVELOPER_DIR: /Applications/Xcode_12.app
16+
17+
jobs:
18+
build:
19+
runs-on: macOS-latest
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
24+
- name: Install Mint
25+
run: brew install mint
26+
27+
- name: Cache Mint packages
28+
uses: actions/cache@v2
29+
with:
30+
path: mint
31+
key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }}
32+
restore-keys: |
33+
${{ runner.os }}-mint-
34+
35+
- name: Mint bootstrap
36+
run: mint bootstrap
37+
38+
- name: Inject Access Token
39+
run: echo "let OPEN_WEATHER_API_KEY = \"${{ secrets.OPEN_WEATHER_API_KEY }}\"" > ./NextSunnyDay/API/AccessTokens.swift
40+
41+
- name: Xcode Build
42+
run: set -o pipefail &&
43+
xcodebuild
44+
-sdk iphonesimulator
45+
-configuration Debug
46+
-scheme NextSunnyDay
47+
build
48+
| xcpretty
49+
50+
- name: Xcode Test
51+
run: set -o pipefail &&
52+
xcodebuild
53+
-sdk iphonesimulator
54+
-configuration Debug
55+
-scheme NextSunnyDay
56+
-destination 'platform=iOS Simulator,name=iPhone 11 Pro Max'
57+
clean test
58+
| xcpretty --report html
59+
60+
- uses: actions/upload-artifact@v2
61+
with:
62+
name: test-results
63+
path: build/reports

.github/workflows/swiftlint.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: SwiftLint
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- develop
7+
paths:
8+
- ".github/workflows/swiftlint.yml"
9+
- ".swiftlint.yml"
10+
- "**/*.swift"
11+
12+
jobs:
13+
SwiftLint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: GitHub Action for SwiftLint
18+
uses: norio-nomura/action-swiftlint@3.1.0

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,4 +196,21 @@ iOSInjectionProject/
196196
!*.xcworkspace/contents.xcworkspacedata
197197
**/xcshareddata/WorkspaceSettings.xcsettings
198198

199+
200+
### AccessToken ###
201+
AccessTokens.swift
202+
203+
204+
### R.Swift ###
205+
*.generated.swift
206+
207+
208+
### LicensePlist ###
209+
com.mono0926.LicensePlist/
210+
com.mono0926.LicensePlist.latest_result.txt
211+
com.mono0926.LicensePlist.plist
212+
213+
# Macintosh
214+
.DS_Store
215+
199216
# End of https://www.toptal.com/developers/gitignore/api/xcode,swift,cocoapods,carthage,ruby,fastlane

.swiftlint.yml

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
# document: https://github.com/realm/SwiftLint
2+
3+
# 無効にするルール
4+
disabled_rules:
5+
- multiple_closures_with_trailing_closure # 複数のクロージャーの場合でも、trailing closureを利用したいため
6+
- empty_enum_arguments # enumの引数を省略したいため
7+
- nesting # 可読性のあるネストもあるため
8+
- force_cast # 強制アンラップが適している場合もあるため
9+
- force_try # 強制アンラップが適している場合もあるため
10+
11+
# opt-inルールの中で無効にするルール
12+
- conditional_returns_on_newline # ガード文などは簡潔に一行で記述したいため
13+
- discouraged_optional_collection # PHImageManagerの既存仕様のため
14+
- explicit_enum_raw_value # 暗黙的なraw値で問題ないため
15+
- explicit_type_interface # 型推論を利用したいため
16+
- fatal_error_message # メッセージは不要なため
17+
- file_header # ヘッダには特に決まりがないため
18+
- lower_acl_than_parent # 対応不可のため
19+
- no_extension_access_modifier # extension_access_modifierを優先するため
20+
- no_grouping_extension # グルーピングにextensionを利用したいため
21+
- strict_fileprivate # fileprivateを利用したいため
22+
- switch_case_on_newline # caseと同じ行に記述したいため
23+
- trailing_closure # RxSwiftのOnNextでwarningが出るため
24+
- cyclomatic_complexity # caseが多い場合に対応するため
25+
- explicit_acl # internalは省略できるため
26+
- explicit_top_level_acl # internalは省略できるため
27+
- force_unwrapping # 絶対nilにならないものもあるため
28+
- closure_body_length # 長く書かざるを得ない場合もあるため
29+
- prefixed_toplevel_constant # kを書く習慣がないため
30+
31+
# defaultルール以外にopt-inから採用するルール
32+
opt_in_rules:
33+
- anyobject_protocol
34+
- array_init
35+
- attributes
36+
- closure_end_indentation
37+
- closure_spacing
38+
- collection_alignment
39+
- conditional_returns_on_newline
40+
- contains_over_first_not_nil
41+
- convenience_type
42+
- discouraged_object_literal
43+
- discouraged_optional_boolean
44+
- discouraged_optional_collection
45+
- empty_count
46+
- empty_xctest_method
47+
- explicit_enum_raw_value
48+
- explicit_init
49+
- explicit_self
50+
- explicit_type_interface
51+
- extension_access_modifier
52+
- fallthrough
53+
- fatal_error_message
54+
- file_header
55+
- file_name
56+
- first_where
57+
- function_default_parameter_at_end
58+
- identical_operands
59+
- implicit_return
60+
- implicitly_unwrapped_optional
61+
- joined_default_parameter
62+
- last_where
63+
- legacy_random
64+
- let_var_whitespace
65+
- literal_expression_end_indentation
66+
- lower_acl_than_parent
67+
- missing_docs
68+
- modifier_order
69+
- multiline_arguments
70+
- multiline_arguments_brackets
71+
- multiline_function_chains
72+
- multiline_literal_brackets
73+
- multiline_parameters
74+
- multiline_parameters_brackets
75+
- nimble_operator
76+
- no_extension_access_modifier
77+
- no_grouping_extension
78+
- nslocalizedstring_key
79+
- number_separator
80+
- operator_usage_whitespace
81+
- overridden_super_call
82+
- override_in_extension
83+
- pattern_matching_keywords
84+
- private_action
85+
- private_outlet
86+
- prohibited_super_call
87+
- quick_discouraged_call
88+
- quick_discouraged_focused_test
89+
- quick_discouraged_pending_test
90+
- redundant_nil_coalescing
91+
- redundant_type_annotation
92+
- required_enum_case
93+
- single_test_class
94+
- sorted_first_last
95+
- sorted_imports
96+
- static_operator
97+
- strict_fileprivate
98+
- strong_iboutlet
99+
- switch_case_on_newline
100+
- toggle_bool
101+
- trailing_closure
102+
- unavailable_function
103+
- unneeded_parentheses_in_closure_argument
104+
- untyped_error_in_catch
105+
- unused_import
106+
- unused_private_declaration
107+
- vertical_parameter_alignment_on_call
108+
- vertical_whitespace_between_cases
109+
- vertical_whitespace_closing_braces
110+
- vertical_whitespace_opening_braces
111+
- xct_specific_matcher
112+
- yoda_condition
113+
114+
# Lint対象に追加するパス
115+
included:
116+
- NextSunnyDay
117+
118+
# Lint対象から除外するパス
119+
excluded:
120+
- Pods
121+
- Carthage
122+
- NextSunnyDay/*/R.generated.swift
123+
124+
# 1行の文字列制限
125+
line_length:
126+
- 200 # warning
127+
- 300 # error
128+
129+
# 型の行数制限
130+
type_body_length:
131+
- 400 # warning
132+
- 600 # error
133+
134+
# 1ファイルの行数制限
135+
file_length:
136+
- 500 # warning
137+
- 1000 # error
138+
139+
# メソッドの行数制限
140+
function_body_length:
141+
- 100 # warning
142+
- 200 # error
143+
144+
type_name:
145+
min_length: 2
146+
max_length: 40
147+
148+
identifier_name:
149+
allowed_symbols: "_"
150+
min_length: # only min_length
151+
warning: 1
152+
reporter: "xcode"

Mintfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
realm/SwiftLint@0.40.3
2+
mac-cain13/R.swift@v5.2.2
3+
mono0926/LicensePlist@3.0.5

0 commit comments

Comments
 (0)