<!--
{
  "availability" : [
    "SwiftPM: 5.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PackageDescription",
  "identifier" : "/documentation/PackageDescription/PluginCommandIntent/sourceCodeFormatting()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "PackageDescription"
    ],
    "preciseIdentifier" : "s:18PackageDescription19PluginCommandIntentO20sourceCodeFormattingACyFZ"
  },
  "title" : "sourceCodeFormatting()"
}
-->

# sourceCodeFormatting()

The plug-in formats source code.

```
static func sourceCodeFormatting() -> PluginCommandIntent
```

## Return Value

A `PluginCommandIntent` instance.

## Discussion

The intent of the command is to modify the source code in the package based
on a set of rules. Invoked by a `format-source-code` verb to `swift package`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)