mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
Leverage the newly-introduced package manifest editing tools in SwiftPM
to create a package editing refactoring operation. This operation can
be triggered from the a target in the manifest itself, e.g.,
.target(name: "MyLib")
and will add a test target to the package manifest that depends on
this target, i.e.,
.testTarget(
name: "MyLibTests",
dependencies: [ "MyLib" ]
)
It will also create a new source file `Tests/MyLibTests/MyLibTests.swift`
that that imports both MyLib and XCTest, and contains an XCTestCase subclass
with one test to get you started.
26 lines
988 B
Swift
26 lines
988 B
Swift
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2014 - 2024 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See https://swift.org/LICENSE.txt for license information
|
|
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
import SwiftRefactor
|
|
|
|
/// List of all of the syntactic code action providers, which can be used
|
|
/// to produce code actions using only the swift-syntax tree of a file.
|
|
let allSyntaxCodeActions: [SyntaxCodeActionProvider.Type] = [
|
|
AddSeparatorsToIntegerLiteral.self,
|
|
ConvertIntegerLiteral.self,
|
|
FormatRawStringLiteral.self,
|
|
MigrateToNewIfLetSyntax.self,
|
|
OpaqueParameterToGeneric.self,
|
|
PackageManifestEdits.self,
|
|
RemoveSeparatorsFromIntegerLiteral.self,
|
|
]
|