Skip to content

Commit

Permalink
Merge pull request #8 from FabrizioBrancati/develop
Browse files Browse the repository at this point in the history
Linux Quality
  • Loading branch information
FabrizioBrancati authored Jul 7, 2018
2 parents b204293 + 5fb66ea commit f99d018
Show file tree
Hide file tree
Showing 26 changed files with 457 additions and 341 deletions.
212 changes: 207 additions & 5 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,213 @@
included:
- Tests
- Sources
- Tests

opt_in_rules:
- array_init
- attributes
- closure_end_indentation
- closure_spacing
- conditional_returns_on_newline
- contains_over_first_not_nil
- convenience_type
- empty_count
- empty_string
- empty_xctest_method
- explicit_acl
- explicit_init
- fallthrough
- fatal_error_message
- file_name
- file_header
- first_where
- force_unwrapping
- implicitly_unwrapped_optional
- joined_default_parameter
- let_var_whitespace
- literal_expression_end_indentation
- lower_acl_than_parent
- mark
- modifier_order
- multiline_arguments
- multiline_function_chains
- multiline_parameters
- nimble_operator
- no_fallthrough_only
- number_separator
- object_literal
- operator_usage_whitespace
- overridden_super_call
- override_in_extension
- pattern_matching_keywords
- private_action
- private_outlet
- prohibited_super_call
- quick_discouraged_call
- quick_discouraged_focused_test
- quick_discouraged_pending_test
- redundant_nil_coalescing
- single_test_class
- sorted_first_last
- sorted_imports
- switch_case_on_newline
- trailing_closure
- unavailable_function
- unneeded_parentheses_in_closure_argument
- untyped_error_in_catch
- vertical_parameter_alignment_on_call
- yoda_condition

disabled_rules:
- line_length
- trailing_whitespace
- type_body_length
- line_length
- file_length

opt_in_rules:
- empty_count
identifier_name:
excluded:
- id
number_separator:
minimum_length: 5
file_header:
required_pattern: |
\/\/
\/\/ SWIFTLINT_CURRENT_FILENAME
\/\/ Queuer
\/\/
\/\/ MIT License
\/\/
\/\/ Copyright \(c\) 2017 - 2018 Fabrizio Brancati
\/\/
\/\/ Permission is hereby granted, free of charge, to any person obtaining a copy
\/\/ of this software and associated documentation files \(the "Software"\), to deal
\/\/ in the Software without restriction, including without limitation the rights
\/\/ to use, copy, modify, merge, publish, distribute, sublicense, and\/or sell
\/\/ copies of the Software, and to permit persons to whom the Software is
\/\/ furnished to do so, subject to the following conditions:
\/\/
\/\/ The above copyright notice and this permission notice shall be included in all
\/\/ copies or substantial portions of the Software\.
\/\/
\/\/ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
\/\/ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
\/\/ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT\. IN NO EVENT SHALL THE
\/\/ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
\/\/ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
\/\/ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
\/\/ SOFTWARE\.
custom_rules:
comments_space:
included: ".*.swift"
name: "Space After Comment"
regex: "(^ *//\\w+)"
message: "There should be a space after //"
severity: warning
double_space:
include: "*.swift"
name: "Double space"
regex: "([a-z,A-Z] \\s+)"
message: "Double space between keywords"
match_kinds: keyword
severity: warning
empty_line_after_guard:
included: ".*.swift"
name: "Empty Line After Guard"
regex: "(^ *guard[ a-zA-Z0-9=?.\\(\\),><!]*\\{[ a-zA-Z0-9=?.\\(\\),><!]*\\}\n *(?!(?:return|guard))\\S+)"
message: "There should be an empty line after a guard"
severity: warning
empty_line_after_super:
included: ".*.swift"
name: "Empty Line After Super"
regex: "(^ *super\\.[ a-zA-Z0-9=?.\\(\\)\\{\\}:,><!]*\n *(?!(?:\\}|return))\\S+)"
message: "There should be an empty line after super"
severity: warning
hardcoded_credential:
included: ".*.swift"
name: "Credentials should not be hard-coded"
regex: 'let \s*(?:token|password|Token|Password)\s*= ".+"'
message: "Because it is easy to extract strings from a compiled application, credentials should never be hard-coded."
severity: warning
if_as_guard:
included: ".*.swift"
name: "If as Guard"
regex: '\n *if [^\{]+\{\s*(?:return|break|continue)[^\n]*\n *\}(?! *else)'
message: "Don't use an if statement to just return/break/continue – use guard for such cases instead."
severity: warning
ip_address:
included: ".*.swift"
name: "IP addresses should not be hardcoded"
regex: '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'
message: "Hardcoding an IP address into source code is a bad idea"
severity: warning
late_force_unwrapping:
included: ".*.swift"
name: "Late Force Unwrapping"
regex: '\(\S+\?\.\S+\)!'
message: "Don't use ? first to force unwrap later – directly unwrap within the parantheses."
severity: warning
missing_docs:
included: ".*.swift"
name: "Missing Docs"
regex: '\n *(?!\/\/\/)(\/\/)?[^\n\/]*\n *(?:@\S+ )*(?!override)(?:public|open)'
message: "Types, properties and methods with public or open access level should be documented."
severity: warning
redundant_parentheses:
included: ".*.swift"
name: "Redundant Parentheses"
regex: '(if|guard) \(.*\) \{'
message: "Condition should not be enclosed within parentheses."
severity: warning
single_line_return:
included: ".*.swift"
name: "Single Line Return"
regex: '\.\S+ *\{(?: *return|[^\n\}]+ in return) [^\}]+\}'
message: "Remove the 'return' when returning from a single line closure."
severity: warning
unnecessary_case_break:
included: ".*.swift"
name: "Unnecessary Case Break"
regex: '(case |default)(?:[^\n\}]+\n){2,}\s*break *\n|\n *\n *break(?:\n *\n|\n *\})'
message: "Don't use break in switch cases – Swift breaks by default."
severity: warning
unnecessary_nil_assignment:
included: ".*.swift"
name: "Unnecessary Nil Assignment"
regex: 'var \S+\s*:\s*[^\s]+\?\s*=\s*nil'
message: "Don't assign nil as a value when defining an optional type – it's nil by default."
severity: warning
unnecessary_type:
included: ".*.swift"
name: "Unnecessary Type"
regex: "[ a-zA-Z0-9]*(?:let|var) [ a-zA-Z0-9]*: ([a-zA-Z0-9]*)[\\? ]*= \\1"
message: "Type Definition Not Needed"
severity: warning
upper_camel_case:
included: ".*.swift"
name: "Upper Camel Case"
regex: "$[^//](?:protocol|class|struct|enum) [a-z]+[a-zA-Z]*"
message: "Class, Struct and Enum names should be UpperCamelCase."
severity: warning
useless_if:
included: ".*.swift"
name: "Useless If"
regex: 'if[ (]*?(:?true|false)[ )]*?\{'
message: "`if` statements with conditions that are always false have the effect of making blocks of code non-functional."
severity: warning
vertical_whitespaces_around_mark:
included: ".*.swift"
name: "Vertical Whitespaces Around MARK:"
regex: '\/\/\s*MARK:[^\n]*(\n)(?!\s*\n)|(\n\n\n)[ \t]*\/\/\s*MARK:|[^\s{]\n[^\n\/]*\/\/\s*MARK:'
message: "Include a single vertical whitespace (empty line) before and after MARK: comments."
severity: warning
vertical_whitespace_opening_braces:
included: ".*.swift"
name: "Vertical Whitespace after Opening Braces"
regex: '[{(\[][ \t]*\n[ \t]*\n'
message: "Don't include vertical whitespace (empty line) after opening braces."
severity: warning
vertical_whitespace_closing_braces:
included: ".*.swift"
name: "Vertical Whitespace after Opening Braces"
regex: '[\}(\[][ \t]*\n[ \t]*\n\}'
message: "Don't include vertical whitespace (empty line) after closing braces."
severity: warning
26 changes: 13 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,55 +14,55 @@ matrix:
env: SPM="YES"
- os: osx
language: objective-c
osx_image: xcode9.3beta
osx_image: xcode9.4
env: SPM="YES"
- os: osx
language: objective-c
osx_image: xcode9.3beta
env: PROJ="Queuer.xcodeproj" DESTINATION="OS=11.2,name=iPhone X" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" LINT="NO" CODECOV="YES"
osx_image: xcode9.4
env: PROJ="Queuer.xcodeproj" DESTINATION="OS=11.4,name=iPhone X" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" LINT="NO" CODECOV="YES"
- os: osx
language: objective-c
osx_image: xcode9.3beta
osx_image: xcode9.4
env: PROJ="Queuer.xcodeproj" DESTINATION="OS=11.1,name=iPhone 7 Plus" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" LINT="YES" CODECOV="NO"
- os: osx
language: objective-c
osx_image: xcode9.3beta
osx_image: xcode9.4
env: PROJ="Queuer.xcodeproj" DESTINATION="OS=10.3.1,name=iPhone 6" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" LINT="NO" CODECOV="NO"
- os: osx
language: objective-c
osx_image: xcode9.3beta
osx_image: xcode9.4
env: PROJ="Queuer.xcodeproj" DESTINATION="OS=9.0,name=iPhone 5s" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" LINT="NO" CODECOV="NO"
- os: osx
language: objective-c
osx_image: xcode9.2
env: PROJ="Queuer.xcodeproj" DESTINATION="OS=8.1,name=iPhone 4S" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" LINT="NO" CODECOV="NO"
- os: osx
language: objective-c
osx_image: xcode9.3beta
osx_image: xcode9.4
env: PROJ="Queuer.xcodeproj" DESTINATION="OS=11.2,name=Apple TV 4K" SCHEME="$TVOS_SCHEME" RUN_TESTS="YES" LINT="NO" CODECOV="NO"
- os: osx
language: objective-c
osx_image: xcode9.3beta
osx_image: xcode9.4
env: PROJ="Queuer.xcodeproj" DESTINATION="OS=10.2,name=Apple TV 1080p" SCHEME="$TVOS_SCHEME" RUN_TESTS="YES" LINT="NO" CODECOV="NO"
- os: osx
language: objective-c
osx_image: xcode9.3beta
osx_image: xcode9.4
env: PROJ="Queuer.xcodeproj" DESTINATION="OS=9.0,name=Apple TV 1080p" SCHEME="$TVOS_SCHEME" RUN_TESTS="YES" LINT="NO" CODECOV="NO"
- os: osx
language: objective-c
osx_image: xcode9.3beta
osx_image: xcode9.4
env: PROJ="Queuer.xcodeproj" DESTINATION="OS=4.2,name=Apple Watch Series 3 - 42mm" SCHEME="$WATCHOS_SCHEME" RUN_TESTS="NO" LINT="NO" CODECOV="NO"
- os: osx
language: objective-c
osx_image: xcode9.3beta
osx_image: xcode9.4
env: PROJ="Queuer.xcodeproj" DESTINATION="OS=3.2,name=Apple Watch Series 2 - 42mm" SCHEME="$WATCHOS_SCHEME" RUN_TESTS="NO" LINT="NO" CODECOV="NO"
- os: osx
language: objective-c
osx_image: xcode9.3beta
osx_image: xcode9.4
env: PROJ="Queuer.xcodeproj" DESTINATION="OS=2.0,name=Apple Watch - 38mm" SCHEME="$WATCHOS_SCHEME" RUN_TESTS="NO" LINT="NO" CODECOV="NO"
- os: osx
language: objective-c
osx_image: xcode9.3beta
osx_image: xcode9.4
env: PROJ="Queuer.xcodeproj" DESTINATION="arch=x86_64" SCHEME="$MACOS_SCHEME" RUN_TESTS="YES" LINT="NO" CODECOV="NO"

before_install:
Expand Down
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,22 @@ All notable changes to this project will be documented in this file.<br>
---

### 1.x Releases
- `1.3.x` Releases - [1.3.0](#130---open-everything) | [1.3.1](#131---swift-41-support)
- `1.3.x` Releases - [1.3.0](#130---open-everything) | [1.3.1](#131---swift-41-support) | [1.3.2](#132---linux-quality)
- `1.2.x` Releases - [1.2.0](#120---swift-4-support) | [1.2.1](#121---unwanted-alert)
- `1.1.x` Releases - [1.1.0](#110---quality-of-service)
- `1.0.x` Releases - [1.0.0](#100---first-queue)

---

## Develop
## [1.3.2](https://github.com/FabrizioBrancati/Queuer/releases/tag/1.3.2) - Linux Quality
### 7 Jul 2018
### Added
- Added `QualityOfService` on Linux
- Deprecated `RequestOperation`, it will be removed in Queuer 2

### Improved
- Updated SwiftLint to 0.26.0
- Improved code with new SwiftLint rules

---

Expand Down
2 changes: 1 addition & 1 deletion Queuer.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = 'Queuer'
s.module_name = 'Queuer'
s.version = '1.3.1'
s.version = '1.3.2'
s.summary = 'Queuer is a queue manager, built on top of OperationQueue and Dispatch (aka GCD).'
s.homepage = 'https://github.com/FabrizioBrancati/Queuer'
s.screenshots = 'https://github.fabriziobrancati.com/queuer/resources/queuer-screenshot.png'
Expand Down
Loading

0 comments on commit f99d018

Please sign in to comment.