Kinvey/swift-sdk

View on GitHub
Kinvey/Kinvey/PushOperation.swift

Summary

Maintainability
F
4 days
Test Coverage

Function execute has a Cognitive Complexity of 147 (exceeds 5 allowed). Consider refactoring.
Open

    func execute(completionHandler: CompletionHandler?) -> AnyRequest<ResultType> {
        var count = UInt(0)
        var errors: [Swift.Error] = []
        
        let collectionName = try! T.collectionName()
Severity: Minor
Found in Kinvey/Kinvey/PushOperation.swift - About 2 days to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function execute has 146 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    func execute(completionHandler: CompletionHandler?) -> AnyRequest<ResultType> {
        var count = UInt(0)
        var errors: [Swift.Error] = []
        
        let collectionName = try! T.collectionName()
Severity: Major
Found in Kinvey/Kinvey/PushOperation.swift - About 5 hrs to fix

    Avoid deeply nested control flow statements.
    Open

                                    if let errorsJson = result["errors"] as? [JsonDictionary],
                                        let objectIds = objectIds,
                                        let cache = self.cache
                                    {
                                        let entitiesJson = results
    Severity: Major
    Found in Kinvey/Kinvey/PushOperation.swift - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                      if request.request.httpMethod != "DELETE" {
                                          if let entities = entities,
                                              let entitiesErrors = entitiesErrors,
                                              let requestIds = requestIds,
                                              let requestIdsRemoved = requestIdsRemoved
      Severity: Major
      Found in Kinvey/Kinvey/PushOperation.swift - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                        for json in results {
                                            if objectId == nil,
                                                index != nil,
                                                let objectIds = objectIds
                                            {
        Severity: Major
        Found in Kinvey/Kinvey/PushOperation.swift - About 45 mins to fix

          Avoid too many return statements within this function.
          Open

                                                  return removed ? objectId : nil
          Severity: Major
          Found in Kinvey/Kinvey/PushOperation.swift - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                                                        return removed ? requestId : nil
            Severity: Major
            Found in Kinvey/Kinvey/PushOperation.swift - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return AnyRequest(pushOperation)
              Severity: Major
              Found in Kinvey/Kinvey/PushOperation.swift - About 30 mins to fix

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                    internal override init(
                        sync: AnySync?,
                        cache: AnyCache<T>?,
                        options: Options?
                    ) {
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift and 1 other location - About 40 mins to fix
                Kinvey/Kinvey/PurgeOperation.swift on lines 16..26

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 52.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Line should not have any trailing whitespace
                Open

                    
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                If statement should not have any line breaks before the opening brace
                Open

                                                    {
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                brace-style

                Definitions of - class - struct - function - Control flow constructs (if, else if, else, switch, for, while, repeat-while) - init - protocol - enum - closure - Getters and Setters (set, get) - extension

                should follow the One True Brace Style (1TBS): each construct has its opening brace one the same line along with the same indentation level as its header, the statements within the braces are indented, and the closing brace at the end is on the same indentation level as the header of the function at a line of its own. Braces are not omitted for a control statement with only a single statement in its scope. Every opening brace must also have one space preceding it.

                Classes

                Preferred

                class SomeClass {
                }
                
                class SomeClass: SomeSuperClass {
                }

                Not Preferred

                class SomeClass
                {
                }
                
                class SomeClass: SomeSuperClass{
                }

                Structs

                Preferred

                struct SomeStruct {
                }
                
                struct SomeStruct : SomeParentStruct {
                }

                Not Preferred

                struct SomeStruct
                {
                }
                
                struct SomeStruct : SomeParentStruct  {
                }

                Functions

                Preferred

                func someMethod() {
                }
                
                func someOtherFunction () -> () {
                }

                Not Preferred

                func someMethod()
                {
                }
                
                func someOtherFunction () -> ()
                {
                }

                Control flow constructs

                • if, else if, and else statement

                Preferred

                if SomeCondition {
                
                } else if someOtherCondition {
                } else {
                }

                Not Preferred

                if SomeCondition
                {
                
                }
                else if someOtherCondition
                {
                }
                else
                {
                }
                • switch statement

                Preferred

                switch SomeData {
                    default:
                        break
                }

                Not Preferred

                switch SomeData
                {
                    default:
                        break
                }
                • for loop

                Preferred

                for var i = 0; i < 10; i+=1 {
                
                }

                Not Preferred

                for var i = 0; i < 10; i+=1
                {
                
                }
                • while loop

                Preferred

                while SomeCondition {
                
                }

                Not Preferred

                while SomeCondition
                {
                
                }
                • repeat-while loop

                Preferred

                repeat {
                
                } while SomeCondition

                Not Preferred

                repeat
                {
                
                } while SomeCondition

                Initializers

                Preferred

                init(someParameter:Double, someOtherParameter:Double) {
                   self.someMember = someParameter
                   self.someOtherMember = someOtherParameter
                }

                Not Preferred

                init(someParameter:Double, someOtherParameter:Double)
                {
                   self.someMember = someParameter
                   self.someOtherMember = someOtherParameter
                }

                Protocols

                Preferred

                protocol SomeProtocol {
                
                }
                
                protocol SomeOtherProtocol : X {
                
                }

                Not Preferred

                protocol SomeProtocol
                {
                
                }
                
                protocol SomeOtherProtocol : X
                {
                }

                Enums

                Preferred

                enum SomeEnum {
                    case A, B, C, D
                }
                
                enum SomeEnum {
                    case A
                    case B
                    case C
                    case D
                }
                
                enum SomeEnum: Int {
                    case A, B, C = 5, D
                }

                Not Preferred

                enum SomeEnum
                {
                    case A, B, C, D
                }
                
                enum SomeEnum
                {
                    case A
                    case B
                    case C
                    case D
                }
                
                enum SomeEnum: Int
                {
                    case A, B, C = 5, D
                }

                Closures

                Preferred

                func someFunction () -> () {
                // closure
                }

                Not Preferred

                func someFunction () -> ()
                {
                // closure
                }

                Setters and Getters

                • set

                Preferred

                set {
                    oldValue = newValue / 2
                }

                Not Preferred

                set
                {
                    oldValue = newValue / 2
                }
                • get

                Preferred

                get {
                    return value * 2
                }

                Not Preferred

                get
                {
                    return value * 2
                }

                Extensions

                Preferred

                extension someExtension {
                }

                Not Preferred

                extension someExtension
                {
                }

                Line should not have any trailing whitespace
                Open

                    
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                Line should not have any trailing whitespace
                Open

                    
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                Empty parentheses following method call with trailing closure argument should be removed
                Open

                                    request.execute() { data, response, error in
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                redundant-parentheses

                Control flow constructs (if, else if, switch, for, while, repeat-while, and guard statements), Exception handling constructs (throw, and do/catch statements), and Initializers (array, dictionary, initializer patterns) should not be enclosed in parentheses.

                Additionally, method calls with no parameters and a trailing closure should not have empty parentheses following the method name.

                Control flow constructs

                • if, else if statement

                Preferred

                if SomeCondition {
                
                } else if SomeOtherCondition {
                }

                Not Preferred

                if (SomeCondition) {
                
                } else if (SomeOtherCondition) {
                }
                • switch statement

                Preferred

                switch SomeData {
                    default:
                        break
                }

                Not Preferred

                switch (SomeData) {
                    default:
                        break
                }
                • for loop

                Preferred

                for var i = 0; i < 10; i+=1 {
                
                }

                Not Preferred

                for (var i = 0; i < 10; i+=1) {
                
                }
                • while loop

                Preferred

                while SomeCondition {
                
                }

                Not Preferred

                while (SomeCondition) {
                
                }
                • repeat-while loop

                Preferred

                repeat {
                
                } while SomeCondition

                Not Preferred

                repeat {
                
                } while (SomeCondition)
                • guard clause

                Preferred

                guard true else {   }

                Not Preferred

                guard (true) else {   }

                Exception handling constructs

                • do/catch statement

                Preferred

                do  {
                
                } catch SomeException {
                
                }

                Not Preferred

                do  {
                
                } catch (SomeException) {
                
                }
                • throw statement

                Preferred

                throw SomeException

                Not Preferred

                throw (SomeException)

                Initializers

                • array items

                Preferred

                var shoppingList: [String] = ["Eggs", "Milk"]

                Not Preferred

                var shoppingList: [String] = [("Eggs"), ("Milk")]
                • dictionary items

                Preferred

                var airports: [String: String] = ["YYZ": "Toronto Pearson", "DUB": "Dublin"]

                Not Preferred

                var airports: [String: String] = [("YYZ"): ("Toronto Pearson"), ("DUB"): ("Dublin")]
                • initializer patterns

                Preferred

                var x: Int = 2
                var y: String = "Sleekbyte"
                var x = 2

                Not Preferred

                var x: Int = (2)
                var y: String = ("Sleekbyte")
                var x = (2)

                Method calls

                Preferred

                items.map {
                  item in item.transform()
                }

                Not Preferred

                items.map() {
                  item in item.transform()
                }

                If statement should not have any line breaks before the opening brace
                Open

                                                    {
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                brace-style

                Definitions of - class - struct - function - Control flow constructs (if, else if, else, switch, for, while, repeat-while) - init - protocol - enum - closure - Getters and Setters (set, get) - extension

                should follow the One True Brace Style (1TBS): each construct has its opening brace one the same line along with the same indentation level as its header, the statements within the braces are indented, and the closing brace at the end is on the same indentation level as the header of the function at a line of its own. Braces are not omitted for a control statement with only a single statement in its scope. Every opening brace must also have one space preceding it.

                Classes

                Preferred

                class SomeClass {
                }
                
                class SomeClass: SomeSuperClass {
                }

                Not Preferred

                class SomeClass
                {
                }
                
                class SomeClass: SomeSuperClass{
                }

                Structs

                Preferred

                struct SomeStruct {
                }
                
                struct SomeStruct : SomeParentStruct {
                }

                Not Preferred

                struct SomeStruct
                {
                }
                
                struct SomeStruct : SomeParentStruct  {
                }

                Functions

                Preferred

                func someMethod() {
                }
                
                func someOtherFunction () -> () {
                }

                Not Preferred

                func someMethod()
                {
                }
                
                func someOtherFunction () -> ()
                {
                }

                Control flow constructs

                • if, else if, and else statement

                Preferred

                if SomeCondition {
                
                } else if someOtherCondition {
                } else {
                }

                Not Preferred

                if SomeCondition
                {
                
                }
                else if someOtherCondition
                {
                }
                else
                {
                }
                • switch statement

                Preferred

                switch SomeData {
                    default:
                        break
                }

                Not Preferred

                switch SomeData
                {
                    default:
                        break
                }
                • for loop

                Preferred

                for var i = 0; i < 10; i+=1 {
                
                }

                Not Preferred

                for var i = 0; i < 10; i+=1
                {
                
                }
                • while loop

                Preferred

                while SomeCondition {
                
                }

                Not Preferred

                while SomeCondition
                {
                
                }
                • repeat-while loop

                Preferred

                repeat {
                
                } while SomeCondition

                Not Preferred

                repeat
                {
                
                } while SomeCondition

                Initializers

                Preferred

                init(someParameter:Double, someOtherParameter:Double) {
                   self.someMember = someParameter
                   self.someOtherMember = someOtherParameter
                }

                Not Preferred

                init(someParameter:Double, someOtherParameter:Double)
                {
                   self.someMember = someParameter
                   self.someOtherMember = someOtherParameter
                }

                Protocols

                Preferred

                protocol SomeProtocol {
                
                }
                
                protocol SomeOtherProtocol : X {
                
                }

                Not Preferred

                protocol SomeProtocol
                {
                
                }
                
                protocol SomeOtherProtocol : X
                {
                }

                Enums

                Preferred

                enum SomeEnum {
                    case A, B, C, D
                }
                
                enum SomeEnum {
                    case A
                    case B
                    case C
                    case D
                }
                
                enum SomeEnum: Int {
                    case A, B, C = 5, D
                }

                Not Preferred

                enum SomeEnum
                {
                    case A, B, C, D
                }
                
                enum SomeEnum
                {
                    case A
                    case B
                    case C
                    case D
                }
                
                enum SomeEnum: Int
                {
                    case A, B, C = 5, D
                }

                Closures

                Preferred

                func someFunction () -> () {
                // closure
                }

                Not Preferred

                func someFunction () -> ()
                {
                // closure
                }

                Setters and Getters

                • set

                Preferred

                set {
                    oldValue = newValue / 2
                }

                Not Preferred

                set
                {
                    oldValue = newValue / 2
                }
                • get

                Preferred

                get {
                    return value * 2
                }

                Not Preferred

                get
                {
                    return value * 2
                }

                Extensions

                Preferred

                extension someExtension {
                }

                Not Preferred

                extension someExtension
                {
                }

                If statement should not have any line breaks before the opening brace
                Open

                                                        {
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                brace-style

                Definitions of - class - struct - function - Control flow constructs (if, else if, else, switch, for, while, repeat-while) - init - protocol - enum - closure - Getters and Setters (set, get) - extension

                should follow the One True Brace Style (1TBS): each construct has its opening brace one the same line along with the same indentation level as its header, the statements within the braces are indented, and the closing brace at the end is on the same indentation level as the header of the function at a line of its own. Braces are not omitted for a control statement with only a single statement in its scope. Every opening brace must also have one space preceding it.

                Classes

                Preferred

                class SomeClass {
                }
                
                class SomeClass: SomeSuperClass {
                }

                Not Preferred

                class SomeClass
                {
                }
                
                class SomeClass: SomeSuperClass{
                }

                Structs

                Preferred

                struct SomeStruct {
                }
                
                struct SomeStruct : SomeParentStruct {
                }

                Not Preferred

                struct SomeStruct
                {
                }
                
                struct SomeStruct : SomeParentStruct  {
                }

                Functions

                Preferred

                func someMethod() {
                }
                
                func someOtherFunction () -> () {
                }

                Not Preferred

                func someMethod()
                {
                }
                
                func someOtherFunction () -> ()
                {
                }

                Control flow constructs

                • if, else if, and else statement

                Preferred

                if SomeCondition {
                
                } else if someOtherCondition {
                } else {
                }

                Not Preferred

                if SomeCondition
                {
                
                }
                else if someOtherCondition
                {
                }
                else
                {
                }
                • switch statement

                Preferred

                switch SomeData {
                    default:
                        break
                }

                Not Preferred

                switch SomeData
                {
                    default:
                        break
                }
                • for loop

                Preferred

                for var i = 0; i < 10; i+=1 {
                
                }

                Not Preferred

                for var i = 0; i < 10; i+=1
                {
                
                }
                • while loop

                Preferred

                while SomeCondition {
                
                }

                Not Preferred

                while SomeCondition
                {
                
                }
                • repeat-while loop

                Preferred

                repeat {
                
                } while SomeCondition

                Not Preferred

                repeat
                {
                
                } while SomeCondition

                Initializers

                Preferred

                init(someParameter:Double, someOtherParameter:Double) {
                   self.someMember = someParameter
                   self.someOtherMember = someOtherParameter
                }

                Not Preferred

                init(someParameter:Double, someOtherParameter:Double)
                {
                   self.someMember = someParameter
                   self.someOtherMember = someOtherParameter
                }

                Protocols

                Preferred

                protocol SomeProtocol {
                
                }
                
                protocol SomeOtherProtocol : X {
                
                }

                Not Preferred

                protocol SomeProtocol
                {
                
                }
                
                protocol SomeOtherProtocol : X
                {
                }

                Enums

                Preferred

                enum SomeEnum {
                    case A, B, C, D
                }
                
                enum SomeEnum {
                    case A
                    case B
                    case C
                    case D
                }
                
                enum SomeEnum: Int {
                    case A, B, C = 5, D
                }

                Not Preferred

                enum SomeEnum
                {
                    case A, B, C, D
                }
                
                enum SomeEnum
                {
                    case A
                    case B
                    case C
                    case D
                }
                
                enum SomeEnum: Int
                {
                    case A, B, C = 5, D
                }

                Closures

                Preferred

                func someFunction () -> () {
                // closure
                }

                Not Preferred

                func someFunction () -> ()
                {
                // closure
                }

                Setters and Getters

                • set

                Preferred

                set {
                    oldValue = newValue / 2
                }

                Not Preferred

                set
                {
                    oldValue = newValue / 2
                }
                • get

                Preferred

                get {
                    return value * 2
                }

                Not Preferred

                get
                {
                    return value * 2
                }

                Extensions

                Preferred

                extension someExtension {
                }

                Not Preferred

                extension someExtension
                {
                }

                Constant should be lowerCamelCase
                Open

                                                } else if let _count = result["count"] as? UInt {
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                constant-naming

                Global constants should follow either UpperCamelCase or lowerCamelCase naming conventions. Local constants should follow lowerCamelCase naming conventions.

                Preferred

                let MaxHeight = 42
                let maxHeight = 42

                Not Preferred

                let max_height = 42

                Line should not have any trailing whitespace
                Open

                                
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                If statement should not have any line breaks before the opening brace
                Open

                                        {
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                brace-style

                Definitions of - class - struct - function - Control flow constructs (if, else if, else, switch, for, while, repeat-while) - init - protocol - enum - closure - Getters and Setters (set, get) - extension

                should follow the One True Brace Style (1TBS): each construct has its opening brace one the same line along with the same indentation level as its header, the statements within the braces are indented, and the closing brace at the end is on the same indentation level as the header of the function at a line of its own. Braces are not omitted for a control statement with only a single statement in its scope. Every opening brace must also have one space preceding it.

                Classes

                Preferred

                class SomeClass {
                }
                
                class SomeClass: SomeSuperClass {
                }

                Not Preferred

                class SomeClass
                {
                }
                
                class SomeClass: SomeSuperClass{
                }

                Structs

                Preferred

                struct SomeStruct {
                }
                
                struct SomeStruct : SomeParentStruct {
                }

                Not Preferred

                struct SomeStruct
                {
                }
                
                struct SomeStruct : SomeParentStruct  {
                }

                Functions

                Preferred

                func someMethod() {
                }
                
                func someOtherFunction () -> () {
                }

                Not Preferred

                func someMethod()
                {
                }
                
                func someOtherFunction () -> ()
                {
                }

                Control flow constructs

                • if, else if, and else statement

                Preferred

                if SomeCondition {
                
                } else if someOtherCondition {
                } else {
                }

                Not Preferred

                if SomeCondition
                {
                
                }
                else if someOtherCondition
                {
                }
                else
                {
                }
                • switch statement

                Preferred

                switch SomeData {
                    default:
                        break
                }

                Not Preferred

                switch SomeData
                {
                    default:
                        break
                }
                • for loop

                Preferred

                for var i = 0; i < 10; i+=1 {
                
                }

                Not Preferred

                for var i = 0; i < 10; i+=1
                {
                
                }
                • while loop

                Preferred

                while SomeCondition {
                
                }

                Not Preferred

                while SomeCondition
                {
                
                }
                • repeat-while loop

                Preferred

                repeat {
                
                } while SomeCondition

                Not Preferred

                repeat
                {
                
                } while SomeCondition

                Initializers

                Preferred

                init(someParameter:Double, someOtherParameter:Double) {
                   self.someMember = someParameter
                   self.someOtherMember = someOtherParameter
                }

                Not Preferred

                init(someParameter:Double, someOtherParameter:Double)
                {
                   self.someMember = someParameter
                   self.someOtherMember = someOtherParameter
                }

                Protocols

                Preferred

                protocol SomeProtocol {
                
                }
                
                protocol SomeOtherProtocol : X {
                
                }

                Not Preferred

                protocol SomeProtocol
                {
                
                }
                
                protocol SomeOtherProtocol : X
                {
                }

                Enums

                Preferred

                enum SomeEnum {
                    case A, B, C, D
                }
                
                enum SomeEnum {
                    case A
                    case B
                    case C
                    case D
                }
                
                enum SomeEnum: Int {
                    case A, B, C = 5, D
                }

                Not Preferred

                enum SomeEnum
                {
                    case A, B, C, D
                }
                
                enum SomeEnum
                {
                    case A
                    case B
                    case C
                    case D
                }
                
                enum SomeEnum: Int
                {
                    case A, B, C = 5, D
                }

                Closures

                Preferred

                func someFunction () -> () {
                // closure
                }

                Not Preferred

                func someFunction () -> ()
                {
                // closure
                }

                Setters and Getters

                • set

                Preferred

                set {
                    oldValue = newValue / 2
                }

                Not Preferred

                set
                {
                    oldValue = newValue / 2
                }
                • get

                Preferred

                get {
                    return value * 2
                }

                Not Preferred

                get
                {
                    return value * 2
                }

                Extensions

                Preferred

                extension someExtension {
                }

                Not Preferred

                extension someExtension
                {
                }

                Line should not have any trailing whitespace
                Open

                                                        
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                Line should not have any trailing whitespace
                Open

                    
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                Line should not have any trailing whitespace
                Open

                        
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                Closure is the function's final argument and may be passed as a trailing closure instead
                Open

                                                    cache.save(entities: _entities.compactMap({ $0 }), syncQuery: nil)
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-closure

                Closures that are the last argument of a function should be passed into the function using trailing closure syntax.

                Preferred

                reversed = names.sort { s1, s2 in return s1 > s2 }

                Not Preferred

                reversed = names.sort({ s1, s2 in return s1 > s2 })

                Line should not have any trailing whitespace
                Open

                    
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                Line should not have any trailing whitespace
                Open

                        
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                Line should not have any trailing whitespace
                Open

                    
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                If statement should not have any line breaks before the opening brace
                Open

                                                    {
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                brace-style

                Definitions of - class - struct - function - Control flow constructs (if, else if, else, switch, for, while, repeat-while) - init - protocol - enum - closure - Getters and Setters (set, get) - extension

                should follow the One True Brace Style (1TBS): each construct has its opening brace one the same line along with the same indentation level as its header, the statements within the braces are indented, and the closing brace at the end is on the same indentation level as the header of the function at a line of its own. Braces are not omitted for a control statement with only a single statement in its scope. Every opening brace must also have one space preceding it.

                Classes

                Preferred

                class SomeClass {
                }
                
                class SomeClass: SomeSuperClass {
                }

                Not Preferred

                class SomeClass
                {
                }
                
                class SomeClass: SomeSuperClass{
                }

                Structs

                Preferred

                struct SomeStruct {
                }
                
                struct SomeStruct : SomeParentStruct {
                }

                Not Preferred

                struct SomeStruct
                {
                }
                
                struct SomeStruct : SomeParentStruct  {
                }

                Functions

                Preferred

                func someMethod() {
                }
                
                func someOtherFunction () -> () {
                }

                Not Preferred

                func someMethod()
                {
                }
                
                func someOtherFunction () -> ()
                {
                }

                Control flow constructs

                • if, else if, and else statement

                Preferred

                if SomeCondition {
                
                } else if someOtherCondition {
                } else {
                }

                Not Preferred

                if SomeCondition
                {
                
                }
                else if someOtherCondition
                {
                }
                else
                {
                }
                • switch statement

                Preferred

                switch SomeData {
                    default:
                        break
                }

                Not Preferred

                switch SomeData
                {
                    default:
                        break
                }
                • for loop

                Preferred

                for var i = 0; i < 10; i+=1 {
                
                }

                Not Preferred

                for var i = 0; i < 10; i+=1
                {
                
                }
                • while loop

                Preferred

                while SomeCondition {
                
                }

                Not Preferred

                while SomeCondition
                {
                
                }
                • repeat-while loop

                Preferred

                repeat {
                
                } while SomeCondition

                Not Preferred

                repeat
                {
                
                } while SomeCondition

                Initializers

                Preferred

                init(someParameter:Double, someOtherParameter:Double) {
                   self.someMember = someParameter
                   self.someOtherMember = someOtherParameter
                }

                Not Preferred

                init(someParameter:Double, someOtherParameter:Double)
                {
                   self.someMember = someParameter
                   self.someOtherMember = someOtherParameter
                }

                Protocols

                Preferred

                protocol SomeProtocol {
                
                }
                
                protocol SomeOtherProtocol : X {
                
                }

                Not Preferred

                protocol SomeProtocol
                {
                
                }
                
                protocol SomeOtherProtocol : X
                {
                }

                Enums

                Preferred

                enum SomeEnum {
                    case A, B, C, D
                }
                
                enum SomeEnum {
                    case A
                    case B
                    case C
                    case D
                }
                
                enum SomeEnum: Int {
                    case A, B, C = 5, D
                }

                Not Preferred

                enum SomeEnum
                {
                    case A, B, C, D
                }
                
                enum SomeEnum
                {
                    case A
                    case B
                    case C
                    case D
                }
                
                enum SomeEnum: Int
                {
                    case A, B, C = 5, D
                }

                Closures

                Preferred

                func someFunction () -> () {
                // closure
                }

                Not Preferred

                func someFunction () -> ()
                {
                // closure
                }

                Setters and Getters

                • set

                Preferred

                set {
                    oldValue = newValue / 2
                }

                Not Preferred

                set
                {
                    oldValue = newValue / 2
                }
                • get

                Preferred

                get {
                    return value * 2
                }

                Not Preferred

                get
                {
                    return value * 2
                }

                Extensions

                Preferred

                extension someExtension {
                }

                Not Preferred

                extension someExtension
                {
                }

                If statement should not have any line breaks before the opening brace
                Open

                                        {
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                brace-style

                Definitions of - class - struct - function - Control flow constructs (if, else if, else, switch, for, while, repeat-while) - init - protocol - enum - closure - Getters and Setters (set, get) - extension

                should follow the One True Brace Style (1TBS): each construct has its opening brace one the same line along with the same indentation level as its header, the statements within the braces are indented, and the closing brace at the end is on the same indentation level as the header of the function at a line of its own. Braces are not omitted for a control statement with only a single statement in its scope. Every opening brace must also have one space preceding it.

                Classes

                Preferred

                class SomeClass {
                }
                
                class SomeClass: SomeSuperClass {
                }

                Not Preferred

                class SomeClass
                {
                }
                
                class SomeClass: SomeSuperClass{
                }

                Structs

                Preferred

                struct SomeStruct {
                }
                
                struct SomeStruct : SomeParentStruct {
                }

                Not Preferred

                struct SomeStruct
                {
                }
                
                struct SomeStruct : SomeParentStruct  {
                }

                Functions

                Preferred

                func someMethod() {
                }
                
                func someOtherFunction () -> () {
                }

                Not Preferred

                func someMethod()
                {
                }
                
                func someOtherFunction () -> ()
                {
                }

                Control flow constructs

                • if, else if, and else statement

                Preferred

                if SomeCondition {
                
                } else if someOtherCondition {
                } else {
                }

                Not Preferred

                if SomeCondition
                {
                
                }
                else if someOtherCondition
                {
                }
                else
                {
                }
                • switch statement

                Preferred

                switch SomeData {
                    default:
                        break
                }

                Not Preferred

                switch SomeData
                {
                    default:
                        break
                }
                • for loop

                Preferred

                for var i = 0; i < 10; i+=1 {
                
                }

                Not Preferred

                for var i = 0; i < 10; i+=1
                {
                
                }
                • while loop

                Preferred

                while SomeCondition {
                
                }

                Not Preferred

                while SomeCondition
                {
                
                }
                • repeat-while loop

                Preferred

                repeat {
                
                } while SomeCondition

                Not Preferred

                repeat
                {
                
                } while SomeCondition

                Initializers

                Preferred

                init(someParameter:Double, someOtherParameter:Double) {
                   self.someMember = someParameter
                   self.someOtherMember = someOtherParameter
                }

                Not Preferred

                init(someParameter:Double, someOtherParameter:Double)
                {
                   self.someMember = someParameter
                   self.someOtherMember = someOtherParameter
                }

                Protocols

                Preferred

                protocol SomeProtocol {
                
                }
                
                protocol SomeOtherProtocol : X {
                
                }

                Not Preferred

                protocol SomeProtocol
                {
                
                }
                
                protocol SomeOtherProtocol : X
                {
                }

                Enums

                Preferred

                enum SomeEnum {
                    case A, B, C, D
                }
                
                enum SomeEnum {
                    case A
                    case B
                    case C
                    case D
                }
                
                enum SomeEnum: Int {
                    case A, B, C = 5, D
                }

                Not Preferred

                enum SomeEnum
                {
                    case A, B, C, D
                }
                
                enum SomeEnum
                {
                    case A
                    case B
                    case C
                    case D
                }
                
                enum SomeEnum: Int
                {
                    case A, B, C = 5, D
                }

                Closures

                Preferred

                func someFunction () -> () {
                // closure
                }

                Not Preferred

                func someFunction () -> ()
                {
                // closure
                }

                Setters and Getters

                • set

                Preferred

                set {
                    oldValue = newValue / 2
                }

                Not Preferred

                set
                {
                    oldValue = newValue / 2
                }
                • get

                Preferred

                get {
                    return value * 2
                }

                Not Preferred

                get
                {
                    return value * 2
                }

                Extensions

                Preferred

                extension someExtension {
                }

                Not Preferred

                extension someExtension
                {
                }

                Line should not have any trailing whitespace
                Open

                    
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                Line should not have any trailing whitespace
                Open

                    
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                Line should not have any trailing whitespace
                Open

                    
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                Closure is the function's final argument and may be passed as a trailing closure instead
                Open

                                                    entitiesErrors = AnyRandomAccessCollection(errorsJson.lazy.compactMap({ (error) -> MultiSaveError? in
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-closure

                Closures that are the last argument of a function should be passed into the function using trailing closure syntax.

                Preferred

                reversed = names.sort { s1, s2 in return s1 > s2 }

                Not Preferred

                reversed = names.sort({ s1, s2 in return s1 > s2 })

                Line should not have any trailing whitespace
                Open

                    
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                Line should not have any trailing whitespace
                Open

                    
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                Line should not have any trailing whitespace
                Open

                        
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                Closure is the function's final argument and may be passed as a trailing closure instead
                Open

                                                    let _entities = AnyRandomAccessCollection(entitiesJson.enumerated().lazy.map({ (offset, entity) -> T? in
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-closure

                Closures that are the last argument of a function should be passed into the function using trailing closure syntax.

                Preferred

                reversed = names.sort { s1, s2 in return s1 > s2 }

                Not Preferred

                reversed = names.sort({ s1, s2 in return s1 > s2 })

                If statement should not have any line breaks before the opening brace
                Open

                                                {
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                brace-style

                Definitions of - class - struct - function - Control flow constructs (if, else if, else, switch, for, while, repeat-while) - init - protocol - enum - closure - Getters and Setters (set, get) - extension

                should follow the One True Brace Style (1TBS): each construct has its opening brace one the same line along with the same indentation level as its header, the statements within the braces are indented, and the closing brace at the end is on the same indentation level as the header of the function at a line of its own. Braces are not omitted for a control statement with only a single statement in its scope. Every opening brace must also have one space preceding it.

                Classes

                Preferred

                class SomeClass {
                }
                
                class SomeClass: SomeSuperClass {
                }

                Not Preferred

                class SomeClass
                {
                }
                
                class SomeClass: SomeSuperClass{
                }

                Structs

                Preferred

                struct SomeStruct {
                }
                
                struct SomeStruct : SomeParentStruct {
                }

                Not Preferred

                struct SomeStruct
                {
                }
                
                struct SomeStruct : SomeParentStruct  {
                }

                Functions

                Preferred

                func someMethod() {
                }
                
                func someOtherFunction () -> () {
                }

                Not Preferred

                func someMethod()
                {
                }
                
                func someOtherFunction () -> ()
                {
                }

                Control flow constructs

                • if, else if, and else statement

                Preferred

                if SomeCondition {
                
                } else if someOtherCondition {
                } else {
                }

                Not Preferred

                if SomeCondition
                {
                
                }
                else if someOtherCondition
                {
                }
                else
                {
                }
                • switch statement

                Preferred

                switch SomeData {
                    default:
                        break
                }

                Not Preferred

                switch SomeData
                {
                    default:
                        break
                }
                • for loop

                Preferred

                for var i = 0; i < 10; i+=1 {
                
                }

                Not Preferred

                for var i = 0; i < 10; i+=1
                {
                
                }
                • while loop

                Preferred

                while SomeCondition {
                
                }

                Not Preferred

                while SomeCondition
                {
                
                }
                • repeat-while loop

                Preferred

                repeat {
                
                } while SomeCondition

                Not Preferred

                repeat
                {
                
                } while SomeCondition

                Initializers

                Preferred

                init(someParameter:Double, someOtherParameter:Double) {
                   self.someMember = someParameter
                   self.someOtherMember = someOtherParameter
                }

                Not Preferred

                init(someParameter:Double, someOtherParameter:Double)
                {
                   self.someMember = someParameter
                   self.someOtherMember = someOtherParameter
                }

                Protocols

                Preferred

                protocol SomeProtocol {
                
                }
                
                protocol SomeOtherProtocol : X {
                
                }

                Not Preferred

                protocol SomeProtocol
                {
                
                }
                
                protocol SomeOtherProtocol : X
                {
                }

                Enums

                Preferred

                enum SomeEnum {
                    case A, B, C, D
                }
                
                enum SomeEnum {
                    case A
                    case B
                    case C
                    case D
                }
                
                enum SomeEnum: Int {
                    case A, B, C = 5, D
                }

                Not Preferred

                enum SomeEnum
                {
                    case A, B, C, D
                }
                
                enum SomeEnum
                {
                    case A
                    case B
                    case C
                    case D
                }
                
                enum SomeEnum: Int
                {
                    case A, B, C = 5, D
                }

                Closures

                Preferred

                func someFunction () -> () {
                // closure
                }

                Not Preferred

                func someFunction () -> ()
                {
                // closure
                }

                Setters and Getters

                • set

                Preferred

                set {
                    oldValue = newValue / 2
                }

                Not Preferred

                set
                {
                    oldValue = newValue / 2
                }
                • get

                Preferred

                get {
                    return value * 2
                }

                Not Preferred

                get
                {
                    return value * 2
                }

                Extensions

                Preferred

                extension someExtension {
                }

                Not Preferred

                extension someExtension
                {
                }

                Line should not have any trailing whitespace
                Open

                                
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                Line should not have any trailing whitespace
                Open

                    
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                Line should not have any trailing whitespace
                Open

                        
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                Line should not have any trailing whitespace
                Open

                                                        
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                Colon at column 108 should have no spaces before it
                Open

                                            let json = try? self.client.jsonParser.parseDictionary(from: data) as? [String : String],
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                colon-whitespace

                There should be no whitespace preceding the colon, exactly one whitespace after the colon for: * var, class, struct, protocol, extension, func, and tuple declarations * dict literals and types * case statements

                However, for conditional expressions there should be a single whitespace before and after the colon.

                Variable declarations

                Preferred

                var x: Int = 2

                Not Preferred

                var x : Int
                var y:   String

                Dictionary literals and types

                Preferred

                var x = [ 'key1': 1, 'key2': 2 ]
                var y: [ Int: String ]

                Not Preferred

                var x = [ 'key1' : 1, 'key2':  3]
                var y: [ Int :    String ]

                Case statements

                Preferred

                switch character {
                case "a": doSomething(a);
                default: alert();
                }

                Not Preferred

                switch character {
                case "a" : doSomething(a);
                default:     alert();
                }

                Class, Struct, Protocol, and Extension declarations

                Preferred

                class ClassName: BaseClass {
                }
                
                struct StructName: BaseStruct {
                }
                
                protocol ProtocolName: AnotherProtocol {
                }
                
                extension TypeName: ProtocolName {
                }

                Not Preferred

                class ClassName : BaseClass {
                }
                
                struct StructName:  BaseStruct {
                }
                
                protocol ProtocolName:AnotherProtocol {
                }
                
                extension TypeName : ProtocolName {
                }

                Tuple declarations

                Preferred

                var y = (key: 1, value: 2)

                Not Preferred

                var y = (key:1, value : 2)

                Function declarations

                Preferred

                func someFunction<t: someclass u: someprotocol>(someT: T, someU: U) {
                }</t:>

                Not Preferred

                func someFunction<t : someclass u:someprotocol>(someT: T, someU: U) {
                }</t>

                Conditional expressions

                Preferred

                var x = condition ? a : b

                Not Preferred

                var x = condition ? a: b
                var x = condition ? a   : b

                Line should not have any trailing whitespace
                Open

                    
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                Line should not have any trailing whitespace
                Open

                    
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                Line should not have any trailing whitespace
                Open

                    
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                If statement should not have any line breaks before the opening brace
                Open

                                            {
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                brace-style

                Definitions of - class - struct - function - Control flow constructs (if, else if, else, switch, for, while, repeat-while) - init - protocol - enum - closure - Getters and Setters (set, get) - extension

                should follow the One True Brace Style (1TBS): each construct has its opening brace one the same line along with the same indentation level as its header, the statements within the braces are indented, and the closing brace at the end is on the same indentation level as the header of the function at a line of its own. Braces are not omitted for a control statement with only a single statement in its scope. Every opening brace must also have one space preceding it.

                Classes

                Preferred

                class SomeClass {
                }
                
                class SomeClass: SomeSuperClass {
                }

                Not Preferred

                class SomeClass
                {
                }
                
                class SomeClass: SomeSuperClass{
                }

                Structs

                Preferred

                struct SomeStruct {
                }
                
                struct SomeStruct : SomeParentStruct {
                }

                Not Preferred

                struct SomeStruct
                {
                }
                
                struct SomeStruct : SomeParentStruct  {
                }

                Functions

                Preferred

                func someMethod() {
                }
                
                func someOtherFunction () -> () {
                }

                Not Preferred

                func someMethod()
                {
                }
                
                func someOtherFunction () -> ()
                {
                }

                Control flow constructs

                • if, else if, and else statement

                Preferred

                if SomeCondition {
                
                } else if someOtherCondition {
                } else {
                }

                Not Preferred

                if SomeCondition
                {
                
                }
                else if someOtherCondition
                {
                }
                else
                {
                }
                • switch statement

                Preferred

                switch SomeData {
                    default:
                        break
                }

                Not Preferred

                switch SomeData
                {
                    default:
                        break
                }
                • for loop

                Preferred

                for var i = 0; i < 10; i+=1 {
                
                }

                Not Preferred

                for var i = 0; i < 10; i+=1
                {
                
                }
                • while loop

                Preferred

                while SomeCondition {
                
                }

                Not Preferred

                while SomeCondition
                {
                
                }
                • repeat-while loop

                Preferred

                repeat {
                
                } while SomeCondition

                Not Preferred

                repeat
                {
                
                } while SomeCondition

                Initializers

                Preferred

                init(someParameter:Double, someOtherParameter:Double) {
                   self.someMember = someParameter
                   self.someOtherMember = someOtherParameter
                }

                Not Preferred

                init(someParameter:Double, someOtherParameter:Double)
                {
                   self.someMember = someParameter
                   self.someOtherMember = someOtherParameter
                }

                Protocols

                Preferred

                protocol SomeProtocol {
                
                }
                
                protocol SomeOtherProtocol : X {
                
                }

                Not Preferred

                protocol SomeProtocol
                {
                
                }
                
                protocol SomeOtherProtocol : X
                {
                }

                Enums

                Preferred

                enum SomeEnum {
                    case A, B, C, D
                }
                
                enum SomeEnum {
                    case A
                    case B
                    case C
                    case D
                }
                
                enum SomeEnum: Int {
                    case A, B, C = 5, D
                }

                Not Preferred

                enum SomeEnum
                {
                    case A, B, C, D
                }
                
                enum SomeEnum
                {
                    case A
                    case B
                    case C
                    case D
                }
                
                enum SomeEnum: Int
                {
                    case A, B, C = 5, D
                }

                Closures

                Preferred

                func someFunction () -> () {
                // closure
                }

                Not Preferred

                func someFunction () -> ()
                {
                // closure
                }

                Setters and Getters

                • set

                Preferred

                set {
                    oldValue = newValue / 2
                }

                Not Preferred

                set
                {
                    oldValue = newValue / 2
                }
                • get

                Preferred

                get {
                    return value * 2
                }

                Not Preferred

                get
                {
                    return value * 2
                }

                Extensions

                Preferred

                extension someExtension {
                }

                Not Preferred

                extension someExtension
                {
                }

                Line should not have any trailing whitespace
                Open

                                                
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                trailing-whitespace

                Flag whitespace after the last non-whitespace character on each line until the newline.

                Preferred

                let number = 42¬

                Not Preferred

                let number = 42••¬

                Constant should be lowerCamelCase
                Open

                                                    let _entities = AnyRandomAccessCollection(entitiesJson.enumerated().lazy.map({ (offset, entity) -> T? in
                Severity: Minor
                Found in Kinvey/Kinvey/PushOperation.swift by tailor

                constant-naming

                Global constants should follow either UpperCamelCase or lowerCamelCase naming conventions. Local constants should follow lowerCamelCase naming conventions.

                Preferred

                let MaxHeight = 42
                let maxHeight = 42

                Not Preferred

                let max_height = 42

                There are no issues that match your filters.

                Category
                Status