<commit_before>/*
 This source file is part of the Swift.org open source project

 Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
 Licensed under Apache License v2.0 with Runtime Library Exception

 See http://swift.org/LICENSE.txt for license information
 See http://swift.org/CONTRIBUTORS.txt for Swift project authors
 */

import Basic
import SourceControl
import PackageLoading
import PackageModel
import SPMUtility

struct UnusedDependencyDiagnostic: DiagnosticData {
    static let id = DiagnosticID(
        type: UnusedDependencyDiagnostic.self,
        name: "org.swift.diags.unused-dependency",
        defaultBehavior: .warning,
        description: {
            $0 <<< "dependency" <<< { "'\($0.dependencyName)'" } <<< "is not used by any target"
        })

    public let dependencyName: String
}

struct ProductHasNoSupportedPlatform: DiagnosticData {
    static let id = DiagnosticID(
        type: ProductHasNoSupportedPlatform.self,
        name: "org.swift.diags.\(ProductHasNoSupportedPlatform.self)",
        defaultBehavior: .error,
        description: {
            $0 <<< "the product" <<< { "'\($0.productDependency)'" }
            $0 <<< "doesn't support any of the platform required by"
            $0 <<< "the target" <<< { "'\($0.target)'" }
        })

    public let productDependency: String
    public let target: String

    init(product: String, target: String) {
        self.productDependency = product
        self.target = target
    }<commit_msg>[PackageGraph] Remove an unused diagnostic<commit_after>/*
 This source file is part of the Swift.org open source project

 Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
 Licensed under Apache License v2.0 with Runtime Library Exception

 See http://swift.org/LICENSE.txt for license information
 See http://swift.org/CONTRIBUTORS.txt for Swift project authors
 */

import Basic
import SourceControl
import PackageLoading
import PackageModel
import SPMUtility

struct UnusedDependencyDiagnostic: DiagnosticData {
    static let id = DiagnosticID(
        type: UnusedDependencyDiagnostic.self,
        name: "org.swift.diags.unused-dependency",
        defaultBehavior: .warning,
        description: {
            $0 <<< "dependency" <<< { "'\($0.dependencyName)'" } <<< "is not used by any target"
        })

    public let dependencyName: String
{'fraction_non_alphanumeric': 0.09836065573770492, 'fraction_numerical': 0.012189995796553174, 'mean_word_length': 3.1901408450704225, 'pattern_counts': {'":': 0, '<': 36, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4617334', 'n_tokens_mistral': 663, 'n_tokens_neox': 611, 'n_words': 211}