mirror of
https://github.com/nicklockwood/SwiftFormat.git
synced 2026-05-17 10:30:35 +00:00
Rename master branch to main
This commit is contained in:
@@ -6,7 +6,7 @@ on:
|
||||
ref:
|
||||
description: 'Ref to build (branch, tag or SHA)'
|
||||
required: false
|
||||
default: 'master'
|
||||
default: 'main'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
|
||||
@@ -6,7 +6,7 @@ on:
|
||||
ref:
|
||||
description: 'Ref to build (branch, tag or SHA)'
|
||||
required: false
|
||||
default: 'master'
|
||||
default: 'main'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
@@ -6,7 +6,7 @@ on:
|
||||
revision:
|
||||
description: 'Revision to build (branch, tag, or SHA)'
|
||||
required: false
|
||||
default: 'master'
|
||||
default: 'main'
|
||||
|
||||
version:
|
||||
description: 'Version being released'
|
||||
@@ -60,4 +60,4 @@ jobs:
|
||||
with:
|
||||
name: SwiftFormat.msi
|
||||
path: ${{ env.MSI_PATH }}
|
||||
retention-days: 5
|
||||
retention-days: 5
|
||||
|
||||
+4
-4
@@ -8,14 +8,14 @@ Here's what you need to know:
|
||||
|
||||
SwiftFormat follows the principles of [Semantic Versioning](http://semver.org/spec/v2.0.0.html) (semver), however since SwiftFormat is still pre-1.0, the rules are a little less strict. In general, 0.0.x releases are for bug fixes and non-breaking changes, and 0.x.0 releases are for breaking changes.
|
||||
|
||||
Since SwiftFormat is an application as well as a framework, "breaking changes" refers to the behavior of the formatter as well as the API. The addition of new rules, or changes to the default behavior of an existing rule are considered to be breaking, even if they do not affect the framework API.
|
||||
Since SwiftFormat is an application as well as a framework, "breaking changes" refers to the behavior of the formatter as well as the API. The addition of new (enabled-by-default) rules, or changes to the behavior of an existing rule are considered to be breaking, even if they do not affect the framework API.
|
||||
|
||||
The SwiftFormat repository has 2 main branches:
|
||||
|
||||
* master - the currently shipping version
|
||||
* main - the currently shipping version
|
||||
* develop - the upcoming version
|
||||
|
||||
Many projects use master for development, but users often check master for documentation or to download the executable app, so to avoid confusion the source and documentation on master should reflect the latest tagged version of SwiftFormat at all times.
|
||||
Many projects use main for development, but users often check main for documentation or to download the executable app, so to avoid confusion the source and documentation on main should reflect the latest tagged version of SwiftFormat at all times.
|
||||
|
||||
## Your First Pull Request
|
||||
|
||||
@@ -25,7 +25,7 @@ All types of PR are welcome, but please do read these guidelines carefully to av
|
||||
|
||||
Types of PR:
|
||||
|
||||
* Documentation fixes - if you've found a typo, or incorrect comment, either in the README or a code comment, feel free to create a PR directly against the **master** branch.
|
||||
* Documentation fixes - if you've found a typo, or incorrect comment, either in the README or a code comment, feel free to create a PR directly against the **main** branch.
|
||||
|
||||
* Minor code fixes - a typo in a method name or a trivial bug fix should be made against the **develop** branch.
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ $ brew upgrade swiftformat
|
||||
Alternatively, you can install the tool on macOS or Linux by using [Mint](https://github.com/yonaskolb/Mint) as follows:
|
||||
|
||||
```bash
|
||||
$ mint install nicklockwood/SwiftFormat
|
||||
$ mint install nicklockwood/SwiftFormat@main
|
||||
```
|
||||
|
||||
Or if you prefer, you can check out and build SwiftFormat manually on macOS, Linux or Windows as follows:
|
||||
@@ -506,7 +506,7 @@ The options available in SwiftFormat can be displayed using the `--options` comm
|
||||
|
||||
Rules are configured by adding `--[option_name] [value]` to your command-line arguments, or by creating a `.swiftformat` [config file](#config-file) and placing it in your project directory.
|
||||
|
||||
A given option may affect multiple rules. Use `--ruleinfo [rule_name]` command for details about which options affect a given rule, or see the [Rules.md](https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md) file.
|
||||
A given option may affect multiple rules. Use `--ruleinfo [rule_name]` command for details about which options affect a given rule, or see the [Rules.md](https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md) file.
|
||||
|
||||
You can configure options for specific files or code ranges by using `swiftformat:options` directive in comments inside your Swift file. To temporarily set one or more options inside a source file, use:
|
||||
|
||||
@@ -525,7 +525,7 @@ doTheThing(); print("Did the thing")
|
||||
Rules
|
||||
-----
|
||||
|
||||
SwiftFormat includes over 50 rules, and new ones are added all the time. An up-to-date list can be found in [Rules.md](https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md) along with documentation for how they are used.
|
||||
SwiftFormat includes over 50 rules, and new ones are added all the time. An up-to-date list can be found in [Rules.md](https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md) along with documentation for how they are used.
|
||||
|
||||
The list of available rules can be displayed within the command-line app using the `--rules` argument. Rules can be either enabled or disabled. Most are enabled by default. Disabled rules are marked with "(disabled)" when displayed using `--rules`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user