Skip to content

Commit 5d52a1e

Browse files
committed
Initial commit
0 parents  commit 5d52a1e

26 files changed

+1452
-0
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
# Maintain dependencies for GitHub Actions
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"
8+
target-branch: "develop"
9+
commit-message:
10+
prefix: "#trivial Dependabot "

.github/workflows/danger.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Danger
2+
3+
on:
4+
push:
5+
branches: stable
6+
pull_request:
7+
8+
jobs:
9+
check:
10+
name: Danger Check
11+
runs-on: ubuntu-latest
12+
steps:
13+
-
14+
name: Checkout
15+
uses: actions/checkout@v3
16+
-
17+
name: Setup Ruby
18+
uses: ruby/setup-ruby@v1
19+
with:
20+
bundler-cache: true
21+
-
22+
name: Run Danger
23+
run: bundle exec danger --verbose
24+
env:
25+
DANGER_GITHUB_API_TOKEN: ${{ secrets.danger_github_api_token }}

.github/workflows/swiftlint.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: SwiftLint
2+
3+
on:
4+
push:
5+
branches: stable
6+
pull_request:
7+
8+
jobs:
9+
lint:
10+
name: SwiftLint
11+
runs-on: macos-12
12+
steps:
13+
-
14+
name: Checkout
15+
uses: actions/checkout@v3
16+
-
17+
name: Setup Ruby
18+
uses: ruby/setup-ruby@v1
19+
with:
20+
bundler-cache: true
21+
-
22+
name: Lint source code
23+
run: bundle exec rake lint:code

.github/workflows/test-spm.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test SPM
2+
3+
on:
4+
push:
5+
branches: stable
6+
pull_request:
7+
8+
jobs:
9+
macos:
10+
name: Test SPM macOS
11+
runs-on: macos-12
12+
steps:
13+
-
14+
name: Checkout
15+
uses: actions/checkout@v3
16+
-
17+
name: Setup Ruby
18+
uses: ruby/setup-ruby@v1
19+
with:
20+
bundler-cache: true
21+
-
22+
name: Cache SPM
23+
uses: actions/cache@v3
24+
with:
25+
path: .build
26+
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package') }}
27+
restore-keys: |
28+
${{ runner.os }}-spm-
29+
-
30+
name: Test Command
31+
run: bundle exec rake spm:test_command

.gitignore

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Xcode
2+
#
3+
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4+
5+
## Build generated
6+
build/
7+
DerivedData/
8+
Sources/TestUtils/Fixtures/CompilationEnvironment/**/*.swiftmodule
9+
10+
## Various settings
11+
*.pbxuser
12+
!default.pbxuser
13+
*.mode1v3
14+
!default.mode1v3
15+
*.mode2v3
16+
!default.mode2v3
17+
*.perspectivev3
18+
!default.perspectivev3
19+
xcuserdata/
20+
.swiftpm
21+
22+
## Other
23+
*.moved-aside
24+
*.xcuserstate
25+
*.xcscmblueprint
26+
27+
## Obj-C/Swift specific
28+
*.hmap
29+
*.ipa
30+
*.dSYM.zip
31+
*.dSYM
32+
33+
## Playgrounds
34+
timeline.xctimeline
35+
playground.xcworkspace
36+
*.playground/Contents.o
37+
38+
# Swift Package Manager
39+
#
40+
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
41+
Packages/
42+
.build/
43+
44+
# CocoaPods
45+
#
46+
# We recommend against adding the Pods directory to your .gitignore. However
47+
# you should judge for yourself, the pros and cons are mentioned at:
48+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
49+
#
50+
# Pods/
51+
52+
# Carthage
53+
#
54+
# Add this line if you want to avoid checking in source code from Carthage dependencies.
55+
Carthage/Checkouts
56+
Carthage/Build
57+
58+
# fastlane
59+
#
60+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
61+
# screenshots whenever they are needed.
62+
# For more information about the recommended setup visit:
63+
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
64+
65+
fastlane/report.xml
66+
fastlane/Preview.html
67+
fastlane/screenshots
68+
fastlane/test_output
69+
70+
# Other stuff
71+
.apitoken
72+
.DS_Store
73+
.idea/
74+
bin/
75+
Frameworks/
76+
Rome/

.rubocop.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
########################################
2+
# Personal Preferences
3+
4+
# It's ok to add some spaces between stuff to make it more readable!
5+
Layout/TrailingEmptyLines:
6+
Enabled: false
7+
8+
# Personal preference (we don't find `json, = Open3.capture3(…)` with the `x, = ` syntax super readable)
9+
Style/TrailingUnderscoreVariable:
10+
Enabled: false
11+
12+
########################################
13+
# Some specific files exceptions
14+
15+
# podspecs are ruby with a special extension
16+
Naming/FileName:
17+
Exclude:
18+
- '*.podspec'
19+
20+
# Rake uses `task :x => [deps]`, we don't want to convert it to `task x: [deps]`
21+
Style/HashSyntax:
22+
Exclude:
23+
- 'Rakefile'
24+
- 'rakelib/*.rake'
25+
26+
# Danger uses `fail` as a keyword, we don't want rubocop to replace it with `raise`
27+
Style/SignalException:
28+
Exclude:
29+
- 'Dangerfile'
30+
31+
########################################
32+
# Metrics
33+
34+
Metrics/ClassLength:
35+
Max: 150
36+
Metrics/MethodLength:
37+
Max: 50
38+
Metrics/BlockLength:
39+
Enabled: false
40+
Layout/LineLength:
41+
Max: 180
42+
43+
Metrics/CyclomaticComplexity:
44+
Enabled: false
45+
Metrics/PerceivedComplexity:
46+
Enabled: false
47+
Metrics/AbcSize:
48+
Enabled: false
49+
50+
########################################
51+
52+
# Enable new cops of recent rucocop updates by default
53+
AllCops:
54+
NewCops: enable

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.0.4

.swiftlint.yml

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
swiftlint_version: 0.47.1
2+
3+
opt_in_rules:
4+
- accessibility_label_for_image
5+
- anonymous_argument_in_multiline_closure
6+
- anyobject_protocol
7+
- array_init
8+
- attributes
9+
- balanced_xctest_lifecycle
10+
- closure_body_length
11+
- closure_end_indentation
12+
- closure_spacing
13+
- collection_alignment
14+
- conditional_returns_on_newline
15+
- contains_over_filter_count
16+
- contains_over_filter_is_empty
17+
- contains_over_first_not_nil
18+
- contains_over_range_nil_comparison
19+
- convenience_type
20+
- discarded_notification_center_observer
21+
- discouraged_assert
22+
- discouraged_none_name
23+
- discouraged_optional_boolean
24+
- discouraged_optional_collection
25+
- empty_collection_literal
26+
- empty_count
27+
- empty_string
28+
- empty_xctest_method
29+
- enum_case_associated_values_count
30+
- fallthrough
31+
- fatal_error_message
32+
- file_header
33+
- first_where
34+
- flatmap_over_map_reduce
35+
- force_unwrapping
36+
- ibinspectable_in_extension
37+
- identical_operands
38+
- implicit_return
39+
- implicitly_unwrapped_optional
40+
- inclusive_language
41+
- indentation_width
42+
- joined_default_parameter
43+
- last_where
44+
- legacy_multiple
45+
- legacy_objc_type
46+
- legacy_random
47+
- literal_expression_end_indentation
48+
- lower_acl_than_parent
49+
- missing_docs
50+
- modifier_order
51+
- multiline_arguments
52+
- multiline_arguments_brackets
53+
- multiline_function_chains
54+
- multiline_literal_brackets
55+
- multiline_parameters
56+
- multiline_parameters_brackets
57+
- nslocalizedstring_key
58+
- nslocalizedstring_require_bundle
59+
- number_separator
60+
- operator_usage_whitespace
61+
- optional_enum_case_matching
62+
- overridden_super_call
63+
- override_in_extension
64+
- pattern_matching_keywords
65+
- prefer_self_in_static_references
66+
- prefer_self_type_over_type_of_self
67+
- prefer_zero_over_explicit_init
68+
- prefixed_toplevel_constant
69+
- private_action
70+
- private_outlet
71+
- private_subject
72+
- prohibited_super_call
73+
- raw_value_for_camel_cased_codable_enum
74+
- reduce_into
75+
- redundant_nil_coalescing
76+
- redundant_type_annotation
77+
- required_enum_case
78+
- return_value_from_void_function
79+
- single_test_class
80+
- sorted_first_last
81+
- sorted_imports
82+
- static_operator
83+
- strict_fileprivate
84+
- strong_iboutlet
85+
- switch_case_on_newline
86+
- test_case_accessibility
87+
- toggle_bool
88+
- trailing_closure
89+
- unavailable_function
90+
- unneeded_parentheses_in_closure_argument
91+
- unowned_variable_capture
92+
- unused_closure_parameter
93+
- vertical_parameter_alignment_on_call
94+
- vertical_whitespace_closing_braces
95+
- vertical_whitespace_opening_braces
96+
- weak_delegate
97+
- xct_specific_matcher
98+
- yoda_condition
99+
100+
# Rules customization
101+
conditional_returns_on_newline:
102+
if_only: true
103+
104+
deployment_target:
105+
iOS_deployment_target: 1.0
106+
macOS_deployment_target: 10.0
107+
tvOS_deployment_target: 1.0
108+
watchOS_deployment_target: 1.0
109+
110+
file_header:
111+
required_pattern: |
112+
\/\/
113+
\/\/ SwiftGenPlugin
114+
\/\/ Copyright © 2022 SwiftGen
115+
\/\/ MIT Licence
116+
\/\/
117+
118+
indentation_width:
119+
indentation_width: 2
120+
121+
line_length:
122+
warning: 120
123+
error: 200
124+
125+
nesting:
126+
type_level:
127+
warning: 2

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# SwiftGenPlugin CHANGELOG
2+
3+
---
4+
5+
## Stable
6+
7+
### Breaking Changes
8+
9+
_None_
10+
11+
### New Features
12+
13+
_None_
14+
15+
### Bug Fixes
16+
17+
_None_
18+
19+
### Internal Changes
20+
21+
_None_

0 commit comments

Comments
 (0)