You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 6, 2018. It is now read-only.
Results: build and tests passes but 10 buildtime errors are reported (identifier_name swiftlint errors)
From command line:
clone the repository
run rake lint:code
Results: command fails with the following output.
Output
== Linting the code ==
swiftlint lint --no-cache --strict --path Sources
Linting Swift files at path Sources
Linting 'AssetsCatalogParser.swift' (1/11)
Linting 'ColorsFileParser.swift' (2/11)
Linting 'FontsFileParser.swift' (3/11)
Linting 'StoryboardParser.swift' (4/11)
Linting 'StringsFileParser.swift' (5/11)
Linting 'AssetsCatalogContext.swift' (6/11)
Linting 'ColorsContext.swift' (7/11)
Linting 'FontsContext.swift' (8/11)
Linting 'StoryboardsContext.swift' (9/11)
Linting 'StringsContext.swift' (10/11)
Linting 'Command.swift' (11/11)
S/Users/sebastienduperron/Perso/wiftGen/SwiftGenKit/Sources/Parsers/FontsFileParser.swift:72:21: warning: Unused Optional Binding Violation: Prefer `!= nil` over `let _ =` (unused_optional_binding)
SwiftGen/SwiftGenKit/Sources/Parsers/StringsFileParser.swift:11:8: error: Identifier Name Violation: Enum element name should start with a lowercase character: 'FailureOnLoading' (identifier_name)
SwiftGen/SwiftGenKit/Sources/Parsers/StringsFileParser.swift:12:8: error: Identifier Name Violation: Enum element name should start with a lowercase character: 'InvalidFormat' (identifier_name)
SwiftGen/SwiftGenKit/Sources/Parsers/StringsFileParser.swift:54:10: error: Identifier Name Violation: Enum element name should start with a lowercase character: 'Object' (identifier_name)
SwiftGen/SwiftGenKit/Sources/Parsers/StringsFileParser.swift:55:10: error: Identifier Name Violation: Enum element name should start with a lowercase character: 'Float' (identifier_name)
SwiftGen/SwiftGenKit/Sources/Parsers/StringsFileParser.swift:56:10: error: Identifier Name Violation: Enum element name should start with a lowercase character: 'Int' (identifier_name)
SwiftGen/SwiftGenKit/Sources/Parsers/StringsFileParser.swift:57:10: error: Identifier Name Violation: Enum element name should start with a lowercase character: 'Char' (identifier_name)
SwiftGen/SwiftGenKit/Sources/Parsers/StringsFileParser.swift:59:10: error: Identifier Name Violation: Enum element name should start with a lowercase character: 'Pointer' (identifier_name)
SwiftGen/SwiftGenKit/Sources/Parsers/StringsFileParser.swift:60:10: error: Identifier Name Violation: Enum element name should start with a lowercase character: 'Unknown' (identifier_name)
SwiftGen/SwiftGenKit/Sources/Parsers/ColorsFileParser.swift:22:35: error: Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'k' (identifier_name)
Done linting! Found 10 violations, 9 serious in 11 files.
rake aborted!
Command failed with status (2): [swiftlint lint --no-cache --strict --path ...]
SwiftGen/SwiftGenKit/rakelib/utils.rake:64:in `plain'
SwiftGen/SwiftGenKit/rakelib/utils.rake:18:in `run'
SwiftGen/SwiftGenKit/rakelib/lint.rake:22:in `block (2 levels) in <top (required)>'
Tasks: TOP => lint:code
(See full trace by running task with --trace)
Solutions
I see two possible solutions for this:
fix the issues.
This seems to work but maybe I am missing the big picture here and the impact on the main SwiftGen project.
ignore the identifier_name rule with a .swiftlint.yml file or with comments where appropriate.
Steps to reproduce
From Xcode:
Results: build and tests passes but 10 buildtime errors are reported (
identifier_name
swiftlint errors)From command line:
rake lint:code
Results: command fails with the following output.
Output
Solutions
I see two possible solutions for this:
This seems to work but maybe I am missing the big picture here and the impact on the main
SwiftGen
project.identifier_name
rule with a.swiftlint.yml
file or with comments where appropriate.Solution 1 is already implemented here Liquidsoul@4b98f49
The text was updated successfully, but these errors were encountered: