A tool to enforce Swift style and conventions.
99 matches across 2 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | …les/Lint/PrivateSwiftUIStatePropertyRuleExamples.swift | 0 | struct contentview: view { @state private var isplaying: bool = false } |
| HIGH | …les/Lint/PrivateSwiftUIStatePropertyRuleExamples.swift | 0 | struct contentview: view { @state private var isplaying: bool = false } |
| HIGH | …les/Lint/PrivateSwiftUIStatePropertyRuleExamples.swift | 0 | struct contentview: view { @state private var isplaying: bool = false } |
| HIGH | …uiltInRules/Rules/Style/OpeningBraceRuleExamples.swift | 0 | if vardecl.parent?.is(codeblockitemsyntax.self) == true // local variable declaration || vardecl.bindings.onlyelement?.a |
| HIGH | …uiltInRules/Rules/Style/OpeningBraceRuleExamples.swift | 0 | if vardecl.parent?.is(codeblockitemsyntax.self) == true // local variable declaration || vardecl.bindings.onlyelement?.a |
| HIGH | …s/Rules/Style/ContrastedOpeningBraceRuleExamples.swift | 0 | if vardecl.parent?.is(codeblockitemsyntax.self) == true // local variable declaration || vardecl.bindings.onlyelement?.a |
| HIGH | …s/Rules/Style/ContrastedOpeningBraceRuleExamples.swift | 0 | if vardecl.parent?.is(codeblockitemsyntax.self) == true // local variable declaration || vardecl.bindings.onlyelement?.a |
| HIGH | …uiltInRules/Rules/Style/OpeningBraceRuleExamples.swift | 0 | func foo() { if q1, q2 { do1() } else if q3, q4 { do2() } } |
| HIGH | …uiltInRules/Rules/Style/OpeningBraceRuleExamples.swift | 0 | func foo() { if q1, q2 { do1() } else if q3, q4 { do2() } } |
| HIGH | …s/Rules/Style/ContrastedOpeningBraceRuleExamples.swift | 0 | func foo() { if q1, q2 { do1() } else if q3, q4 { do2() } } |
| HIGH | …s/Rules/Style/ContrastedOpeningBraceRuleExamples.swift | 0 | func foo() { if q1, q2 { do1() } else if q3, q4 { do2() } } |
| HIGH | …BuiltInRules/Rules/Style/SwitchCaseAlignmentRule.swift | 0 | switch i { \(violationmarker)case .x: 1 \(violationmarker)default: 0 } |
| HIGH | …BuiltInRules/Rules/Style/SwitchCaseAlignmentRule.swift | 0 | switch i { \(violationmarker)case .x: 1 \(violationmarker)default: 0 } |
| HIGH | …BuiltInRules/Rules/Style/SwitchCaseAlignmentRule.swift | 0 | switch i { \(violationmarker)case .x: 1 \(violationmarker)default: 0 } |
| HIGH | …s/Rules/Style/FunctionNameWhitespaceRuleExamples.swift | 0 | func foo< t >( param1: int, param2: bool, param3: [string] ) { } |
| HIGH | …s/Rules/Style/FunctionNameWhitespaceRuleExamples.swift | 0 | func foo< t >( param1: int, param2: bool, param3: [string] ) { } |
| HIGH | …s/Rules/Style/FunctionNameWhitespaceRuleExamples.swift | 0 | func foo< t >( param1: int, param2: bool, param3: [string] ) { } |
| HIGH | …s/Rules/Style/FunctionNameWhitespaceRuleExamples.swift | 0 | func foo < t > ( param1: int, param2: bool, param3: [string] ) { } |
| HIGH | …s/Rules/Style/FunctionNameWhitespaceRuleExamples.swift | 0 | func foo < t > ( param1: int, param2: bool, param3: [string] ) { } |
| HIGH | …s/Rules/Style/FunctionNameWhitespaceRuleExamples.swift | 0 | func foo < t > ( param1: int, param2: bool, param3: [string] ) { } |
| HIGH | …s/Rules/Style/FunctionNameWhitespaceRuleExamples.swift | 0 | func foo < t > ( param1: int, param2: bool, param3: [string] ) { } |
| HIGH | …s/Rules/Style/FunctionNameWhitespaceRuleExamples.swift | 0 | func foo < t > ( param1: int, param2: bool, param3: [string] ) { } |
| HIGH | …es/Rules/Style/ClosureEndIndentationRuleExamples.swift | 0 | function( closure: { x in print(x) }, anotherclosure: { y in print(y) }) |
| HIGH | …es/Rules/Style/ClosureEndIndentationRuleExamples.swift | 0 | function( closure: { x in print(x) }, anotherclosure: { y in print(y) }) |
| HIGH | …es/Rules/Style/ClosureEndIndentationRuleExamples.swift | 0 | function( closure: { x in print(x) }, anotherclosure: { y in print(y) }) |
| HIGH | …iltInRules/Rules/Style/SortedImportsRuleExamples.swift | 0 | // header import ddd import sss // some comment import fff // a comment |
| HIGH | …iltInRules/Rules/Style/SortedImportsRuleExamples.swift | 0 | // header import ddd import sss // some comment import fff // a comment |
| HIGH | …iltInRules/Rules/Style/SortedImportsRuleExamples.swift | 0 | // header import ddd import sss // some comment import fff // a comment |
| HIGH | …Style/VerticalWhitespaceBetweenCasesRuleExamples.swift | 0 | switch x { case .a: print("a") #if debug case .b: print("b") #endif case .c: print("c") } |
| HIGH | …Style/VerticalWhitespaceBetweenCasesRuleExamples.swift | 0 | switch x { case .a: print("a") #if debug case .b: print("b") #endif case .c: print("c") } |
| HIGH | …Style/VerticalWhitespaceBetweenCasesRuleExamples.swift | 0 | switch x { case .a: print("a") #if debug case .b: print("b") #endif case .c: print("c") } |
| HIGH | …les/Rules/Idiomatic/RedundantStringEnumValueRule.swift | 0 | enum numbers: string { case one = "one" case two = "two" } |
| HIGH | …les/Rules/Idiomatic/RedundantStringEnumValueRule.swift | 0 | enum numbers: string { case one = "one" case two = "two" } |
| HIGH | …InRules/Rules/Idiomatic/ExplicitEnumRawValueRule.swift | 0 | enum numbers: string { case one = "one" case two = "two" } |
| HIGH | …les/Idiomatic/RedundantObjcAttributeRuleExamples.swift | 0 | @objc extension foo { ↓@objc private var bar: int { return 0 } } |
| HIGH | …les/Idiomatic/RedundantObjcAttributeRuleExamples.swift | 0 | @objc extension foo { ↓@objc private var bar: int { return 0 } } |
| HIGH | …les/Idiomatic/RedundantObjcAttributeRuleExamples.swift | 0 | @objc extension foo { ↓@objc private var bar: int { return 0 } } |
| HIGH | …ules/Rules/Idiomatic/RedundantTypeAnnotationRule.swift | 0 | class viewcontroller: uiviewcontroller { func somemethod() { let myvar↓: int = int(5) } } |
| HIGH | …ules/Rules/Idiomatic/RedundantTypeAnnotationRule.swift | 0 | class viewcontroller: uiviewcontroller { func somemethod() { let myvar↓: int = int(5) } } |
| HIGH | …ules/Rules/Idiomatic/RedundantTypeAnnotationRule.swift | 0 | class viewcontroller: uiviewcontroller { func somemethod() { let myvar↓: int = int(5) } } |
| HIGH | Tests/FrameworkTests/ModifierOrderTests.swift | 0 | @mainactor class foo { nonisolated public func bar() {} } |
| HIGH | Tests/FrameworkTests/ModifierOrderTests.swift | 0 | @mainactor class foo { nonisolated public func bar() {} } |
| HIGH | Tests/FrameworkTests/ModifierOrderTests.swift | 0 | @mainactor class foo { nonisolated public func bar() {} } |
| HIGH | Tests/FrameworkTests/ModifierOrderTests.swift | 0 | @mainactor class foo { nonisolated public func bar() {} } |
| HIGH | Tests/FrameworkTests/ModifierOrderTests.swift | 0 | @mainactor class foo { public nonisolated func bar() {} } |
| HIGH | Tests/FrameworkTests/ModifierOrderTests.swift | 0 | @mainactor class foo { public nonisolated func bar() {} } |
| HIGH | Tests/FrameworkTests/ModifierOrderTests.swift | 0 | @mainactor class foo { public nonisolated func bar() {} } |
| HIGH | Tests/MacroTests/SwiftSyntaxRuleTests.swift | 0 | struct hello {} extension hello: swiftsyntaxrule { func makevisitor(file: swiftlintfile) -> violationssyntaxvisitor<conf |
| HIGH | Tests/MacroTests/SwiftSyntaxRuleTests.swift | 0 | struct hello {} extension hello: swiftsyntaxrule { func makevisitor(file: swiftlintfile) -> violationssyntaxvisitor<conf |
| HIGH | Tests/MacroTests/SwiftSyntaxRuleTests.swift | 0 | struct hello {} extension hello: swiftsyntaxrule { func makevisitor(file: swiftlintfile) -> violationssyntaxvisitor<conf |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | …wiftLintBuildToolPlugin/SwiftLintBuildToolPlugin.swift | 21 | } |
| LOW | Source/SwiftLintCore/Models/RuleDescription.swift | 21 | |
| LOW | Source/SwiftLintCore/Models/RuleDescription.swift | 41 | public let triggeringExamples: [Example] |
| LOW | Source/SwiftLintCore/Models/RuleDescription.swift | 81 | /// |
| LOW | …wiftLintCore/Models/RuleConfigurationDescription.swift | 281 | infix operator =>: MultiplicationPrecedence |
| LOW | …wiftLintCore/Models/RuleConfigurationDescription.swift | 321 | |
| LOW | …wiftLintCore/Models/RuleConfigurationDescription.swift | 361 | /// absolutely clear that there is an error in the YAML configuration passed in. Since it may be used in a nested |
| LOW | …wiftLintCore/Models/RuleConfigurationDescription.swift | 381 | /// ``` |
| LOW | …wiftLintCore/Models/RuleConfigurationDescription.swift | 401 | /// will have a nested configuration section: |
| LOW | …wiftLintCore/Models/RuleConfigurationDescription.swift | 481 | /// It allows to skip explicit initialization of the property with `nil`. |
| LOW | Source/SwiftLintCore/Models/Example.swift | 1 | import Foundation |
| LOW | Source/SwiftLintCore/Models/Example.swift | 21 | /// - SeeAlso: addEmoji(_:) |
| LOW | Source/SwiftLintCore/Models/Example.swift | 41 | /// why a rule is applied and where not. Complex examples with rarely used language constructs or |
| LOW | Source/SwiftLintCore/Models/Region.swift | 1 | import SwiftSyntax |
| LOW | Source/SwiftLintCore/Models/Region.swift | 41 | } |
| LOW | Source/SwiftLintCore/Models/AccessControlLevel.swift | 1 | /// The accessibility of a Swift source declaration. |
| LOW | Source/SwiftLintCore/Extensions/Array+SwiftLint.swift | 121 | /// |
| LOW | …urce/SwiftLintCore/Extensions/Collection+Windows.swift | 1 | // swiftlint:disable:next blanket_disable_command |
| LOW | …urce/SwiftLintCore/Extensions/Collection+Windows.swift | 21 | /// Returns a collection of all the overlapping slices of a given size. |
| LOW | …urce/SwiftLintCore/Extensions/Collection+Windows.swift | 161 | // `endIndex` and the index before it both have `base.endIndex` as their |
| LOW | …tLintCore/Extensions/SwiftLintFile+BodyLineCount.swift | 1 | import SwiftSyntax |
| LOW | …tLintCore/Extensions/SwiftLintFile+BodyLineCount.swift | 21 | // |
| LOW | …Core/Extensions/RandomAccessCollection+Swiftlint.swift | 1 | public extension RandomAccessCollection where Index == Int { |
| LOW | …Core/Extensions/RandomAccessCollection+Swiftlint.swift | 21 | /// - complexity: O(log(*n*)), where *n* is the length of the collection. |
| LOW | Source/SwiftLintCore/Protocols/CollectingRule.swift | 1 | /// Type-erased protocol used to check whether a rule is collectable. |
| LOW | Source/SwiftLintCore/Protocols/CollectingRule.swift | 21 | /// - returns: The collected file information. |
| LOW | Source/SwiftLintCore/Protocols/Rule.swift | 21 | /// Creates a rule by applying its configuration. |
| LOW | Source/SwiftLintCore/Protocols/Rule.swift | 41 | func validate(file: SwiftLintFile, compilerArguments: [String]) -> [StyleViolation] |
| LOW | Source/SwiftLintCore/Protocols/Rule.swift | 61 | /// - parameter file: The file for which to collect info. |
| LOW | Source/SwiftLintCore/Protocols/Rule.swift | 81 | /// - Parameters: |
| LOW | Source/SwiftLintCore/Protocols/Rule.swift | 161 | public extension Rule { |
| LOW | Source/SwiftLintCore/Protocols/Rule.swift | 181 | /// - parameter file: The file for which to correct violations. |
| LOW | Source/SwiftLintCore/Protocols/SwiftSyntaxRule.swift | 1 | import SwiftSyntax |
| LOW | Source/SwiftLintCore/Protocols/SwiftSyntaxRule.swift | 81 | /// A violation produced by `ViolationsSyntaxVisitor`s. |
| LOW | Source/SwiftLintCore/Protocols/SwiftSyntaxRule.swift | 101 | self.replacement = replacement |
| LOW | Source/SwiftLintCore/Protocols/ASTRule.swift | 1 | import SourceKittenFramework |
| LOW | Source/SwiftLintCore/Protocols/ASTRule.swift | 21 | /// - parameter dictionary: The `SourceKittenDictionary` representing the source structure from which to extract the |
| LOW | …iltInRules/Rules/Lint/MultilineCallArgumentsRule.swift | 181 | private extension FunctionCallExprSyntax { |
| LOW | …LintBuiltInRules/Rules/Lint/RequiredEnumCaseRule.swift | 1 | import SwiftSyntax |
| LOW | …LintBuiltInRules/Rules/Lint/RequiredEnumCaseRule.swift | 21 | /// ... |
| LOW | …LintBuiltInRules/Rules/Lint/RequiredEnumCaseRule.swift | 41 | /// |
| LOW | …les/Idiomatic/UnneededSynthesizedInitializerRule.swift | 1 | // swiftlint:disable file_header |
| LOW | …ltInRules/Rules/Idiomatic/XCTSpecificMatcherRule.swift | 141 | // |
| LOW | Source/SwiftLintFramework/UpdateChecker.swift | 1 | // swiftlint:disable file_header |
| LOW | …e/SwiftLintFramework/Configuration/Configuration.swift | 141 | /// - parameter includedPaths: Included paths to lint. |
| LOW | …e/SwiftLintFramework/Configuration/Configuration.swift | 201 | checkForUpdates: checkForUpdates |
| LOW | …ftLintFramework/Extensions/FileManager+SwiftLint.swift | 1 | import FilenameMatcher |
| LOW | Source/SwiftLintExtraRules/ExtraRules.swift | 1 | // DO NOT EDIT |
| LOW | Tests/FrameworkTests/Resources/test.txt | 1 | // My file with |