Skip to content

add-setting should properly format inserted code #8966

@AnthonyLatsis

Description

@AnthonyLatsis

Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?

  • Confirmed reproduction steps with SwiftPM CLI. The description text must include reproduction steps with either of command-line SwiftPM commands, swift build, swift test, swift package etc.

Description

See https://github.com/swiftlang/swift-package-manager/blob/e1deb23fd284a18ae36b9afea7e420cc30c68313/Fixtures/SwiftMigrate/UpdateManifest/Package.updated.targets-all.swift. This file is the current end state for the corresponding manifest in a test case that invokes swift package migrate against the enclosing package.

Expected behavior

The inserted swiftSettings argument is properly formatted.

Actual behavior

  • No whitespace before the new argument
  • Indentation is off
  • No line break before the ]

Steps to reproduce

Run the CommandsTests.PackageCommandNativeTests/testMigrateCommandUpdateManifest2Targets test.

Swift Package Manager version/commit hash

e1deb23

Swift & OS version (output of swift --version ; uname -a)

No response

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions