Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Organize file structure #91

Merged
merged 2 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ excluded:
- .build
opt_in_rules: [all]
disabled_rules:
- anonymous_argument_in_multiline_closure
- conditional_returns_on_newline
- contrasted_opening_brace
- discouraged_optional_collection
- explicit_acl
- explicit_enum_raw_value
- explicit_top_level_acl
Expand All @@ -18,16 +20,20 @@ disabled_rules:
- force_try
- force_unwrapping
- function_default_parameter_at_end
- indentation_width
- lower_acl_than_parent
- missing_docs
- no_extension_access_modifier
- no_grouping_extension
- no_magic_numbers
- non_overridable_class_declaration
- object_literal
- prefer_nimble
- prefixed_toplevel_constant
- prohibited_interface_builder
- required_deinit
- sorted_enum_cases
- static_over_final_class
- strict_fileprivate
- strong_iboutlet
- switch_case_on_newline
Expand All @@ -43,21 +49,21 @@ line_length:
ignores_interpolated_strings: true
file_length:
ignore_comment_only_lines: true
cyclomatic_complexity:
ignores_case_statements: true
explicit_type_interface:
allow_redundancy: true
excluded:
- local
nesting:
type_level: 2
attributes:
always_on_same_line:
- '@IBAction'
- '@NSManaged'
- '@objc'
cyclomatic_complexity:
ignores_case_statements: true
identifier_name:
excluded:
- ^i$
- ^id$
multiline_arguments:
only_enforce_after_first_closure_on_first_line: true
nesting:
type_level: 2
number_separator:
minimum_length: 5
trailing_comma:
Expand Down
2 changes: 1 addition & 1 deletion Sources/MultipartFormDataParser/Extensions/Data+Util.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ extension Data {
let bytes = self.bytes
var result = [Data]()
var position = 0
for i in 0..<count - 1 { // swiftlint:disable:this identifier_name
for i in 0..<count - 1 {
let current = Array(bytes[i..<(i + separator.count)])
if current == separator {
if i > 0 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ private extension MultipartFormDataParser {
defer { stream.close() }
var data = Data()
while stream.hasBytesAvailable {
// swiftlint:disable:next no_magic_numbers
var buffer = [UInt8](repeating: 0, count: 512)
let readCount = stream.read(&buffer, maxLength: buffer.count)
guard readCount > 0 else { break }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ struct Image: Hashable {
self.data = data
}
}

#endif

Large diffs are not rendered by default.

Loading