<commit_before>//
//  MAError.swift
//  mas-cli
//
//  Created by <NAME> on 21/08/2015.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import Foundation

public enum MASError: Error, Equatable {
    case notSupported

    case notSignedIn
    case signInFailed(error: NSError?)
    case alreadySignedIn

    case purchaseFailed(error: NSError?)
    case downloadFailed(error: NSError?)
    case noDownloads
    case cancelled

    case searchFailed
    case noSearchResultsFound
    case noVendorWebsite

    case notInstalled
    case uninstallFailed

    case urlEncoding
    case noData
    case jsonParsing(error: NSError?)
}

// MARK: - CustomStringConvertible
extension MASError: CustomStringConvertible {
    public var description: String {
        switch self {
        case .notSignedIn:
            return "Not signed in"

        case .notSupported:
            return """
                This command is not supported on this macOS version due to changes in macOS. \
                For more information see: \
                https://github.com/mas-cli/mas#known-issues
                """

        case .signInFailed(let error):
            if let error = error {
                return "Sign in failed: \(error.localizedDescription)"
            } else {
                return "Sign in failed"
            }

        case .alreadySignedIn:
            return "Already signed in"

        case .purchaseFailed(let error):
            if let error = error {
                return "Download request failed: \(error.localizedDescription)"
            } else {
                return "Download request failed"
            }
<commit_msg>🐛 Fix link to known issues<commit_after>//
//  MAError.swift
//  mas-cli
//
//  Created by <NAME> on 21/08/2015.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import Foundation

public enum MASError: Error, Equatable {
    case notSupported

    case notSignedIn
    case signInFailed(error: NSError?)
    case alreadySignedIn

    case purchaseFailed(error: NSError?)
    case downloadFailed(error: NSError?)
    case noDownloads
    case cancelled

    case searchFailed
    case noSearchResultsFound
    case noVendorWebsite

    case notInstalled
    case uninstallFailed

    case urlEncoding
    case noData
    case jsonParsing(error: NSError?)
}

// MARK: - CustomStringConvertible
extension MASError: CustomStringConvertible {
    public var description: String {
        switch self {
        case .notSignedIn:
            return "Not signed in"

        case .notSupported:
            return """
                This command is not supported on this macOS version due to changes in macOS. \
                For more information see: \
                https://github.com/mas-cli/mas#%EF%B8%8F-known-issues
                """

        case .signInFailed(let error):
            if let error = error {
                return "Sign in failed: \(error.localizedDescription)"
            } else {
                return "Sign in failed"
            }

        case .alreadySignedIn:
            return "Already signed in"

        case .purchaseFailed(let error):
            if let error = error {
                return "Download request failed: \(error.localizedDescription)"
            } else {
                return "Download request failed"
            }

{'fraction_non_alphanumeric': 0.07577118897873615, 'fraction_numerical': 0.007786762503743636, 'mean_word_length': 1.8867761452031115, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5697846', 'n_tokens_mistral': 940, 'n_tokens_neox': 858, 'n_words': 279}