uias / Pageboy

📖 A simple, highly informative page view controller
MIT License
1.99k stars 154 forks source link

Pageboy-Example: scrollTo(index:) causes "Identifier Name Violation" #199

Closed ericrieper closed 5 years ago

ericrieper commented 5 years ago

On: commit ce1ee131b89f495bc7fa7a8350be0e48d4082245 (HEAD -> master, tag: 3.0.5, origin/master, origin/HEAD)

When attempting to build and run the iOS Pageboy-Example project using Xcode 10.1 (10B61):

I get two Identifier Name Violation errors that prevent building.

/Pageboy/Sources/Pageboy/AutoScrolling/PageboyAutoScroller.swift:48: Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'custom(duration:)' (identifier_name)
public enum IntermissionDuration {
        case short
        case long
        case custom(duration: TimeInterval) <----- this line
    }

and

/Pageboy/Sources/Pageboy/PageboyViewController+Updating.swift:21: Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'scrollTo(index:)' (identifier_name)
public enum PageUpdateBehavior {
        case doNothing
        case scrollToUpdate
        case scrollTo(index: PageIndex) <----- this line
    }

It appears that enums with parameters throw it off? I'm not sure if this is an issue with my Xcode setup or something else.

Thanks!

msaps commented 5 years ago

@ericrieper looks like a SwiftLint error - try updating it? I currently have 0.29.1 and it seems to cause no issues.

0.30.1 looks like its the latest..