LinterCache

public final class LinterCache

A persisted cache for storing and retrieving linter results.

  • Creates a LinterCache by specifying a SwiftLint configuration and a file manager.

    Declaration

    Swift

    public init(configuration: Configuration, fileManager: some LintableFileManager = FileManager.default)

    Parameters

    configuration

    The SwiftLint configuration for which this cache will be used.

    fileManager

    The file manager to use to read lintable file information.

  • Persists the cache to disk.

    Throws

    Throws if the linter cache doesn’t have a location value, if the cache couldn’t be serialized, or if the contents couldn’t be written to disk.

    Declaration

    Swift

    public func save() throws