LintableFileManager

public protocol LintableFileManager

An interface for enumerating files that can be linted by SwiftLint.

  • Returns all files that can be linted in the specified path. If the path is relative, it will be appended to the specified root path, or currentt working directory if no root directory is specified.

    Declaration

    Swift

    func filesToLint(inPath path: String, rootDirectory: String?) -> [String]

    Parameters

    path

    The path in which lintable files should be found.

    rootDirectory

    The parent directory for the specified path. If none is provided, the current working directory will be used.

    Return Value

    Files to lint.

  • Returns the date when the file at the specified path was last modified. Returns nil if the file cannot be found or its last modification date cannot be determined.

    Declaration

    Swift

    func modificationDate(forFileAtPath path: String) -> Date?

    Parameters

    path

    The file whose modification date should be determined.

    Return Value

    A date, if one was determined.