nalexn / clean-architecture-swiftui

SwiftUI sample app using Clean Architecture. Examples of working with CoreData persistence, networking, dependency injection, unit testing, and more.
MIT License
5.57k stars 671 forks source link

App doesn't build #9

Closed GJNilsen closed 4 years ago

GJNilsen commented 4 years ago

/UnitTests/Mocks/MockedInteractors.swift:38:14: Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'loadCountryDetails(_:)' (identifier_name)

/UnitTests/Mocks/MockedInteractors.swift:63:14: Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'loadImage(_:)' (identifier_name)

/UnitTests/Mocks/MockedWebRepositories.swift:25:14: Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'loadCountryDetails(_:)' (identifier_name)

/UnitTests/Mocks/MockedWebRepositories.swift:48:14: Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'loadImage(_:)' (identifier_name)

/CountriesSwiftUI/Repositories/CountriesWebRepository.swift:49:14: Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'countryDetails(_:)' (identifier_name)

/CountriesSwiftUI/Utilities/APICall.swift:20:10: Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'httpCode(_:)' (identifier_name)

/CountriesSwiftUI/System/SystemEventsHandler.swift:80:14: Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'showCountryFlag(alpha3Code:)' (identifier_name)

/CountriesSwiftUI/Utilities/Loadable.swift:14:10: Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'isLoading(last:)' (identifier_name)

/CountriesSwiftUI/Utilities/Loadable.swift:15:10: Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'loaded(_:)' (identifier_name)

/CountriesSwiftUI/Utilities/Loadable.swift:16:10: Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'failed(_:)' (identifier_name)

nalexn commented 4 years ago

Run this in Terminal:

brew uninstall --force swiftlint && brew install swiftlint

nalexn commented 4 years ago

@GJNilsen , alternatively, you can remove the Swiftlint check from the Build Phases. Closing this issue

Screenshot 2020-01-23 at 13 13 43
GJNilsen commented 4 years ago

Thanks. Btw Swiftlint should probably be listed as a requirement in the read me.

nalexn commented 4 years ago

It's not a requirement. Shell command checks if swiftlint is installed and skips this step otherwise:

if command -v swiftlint > /dev/null; then
  swiftlint lint --config "${SRCROOT}/.swiftlint.yml"
fi
nalexn commented 4 years ago

In your case, you probably had a quite old swiftlint version that didn't support some commands from the config file