Skip to content

Rebase with swift 6.1.1 release #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

srijan-deepsource
Copy link

No description provided.

allevato and others added 30 commits February 4, 2024 17:46
Find configuration based on CWD when formatting from stdin
As trivial as this is, this change is to prevent a conflict with running the plugin with the `--configuration` parameter which is recognised and parsed by the Swift Package Manager and expects to be either `debug` or `release`.

The replacement of `--swift-format-configuration` is verbose, but other choices looked too ambiguous or confusing whereas this is at least clear as to what the parameter is doing.
…ation-argument

Renamed plugin configuration parameter
…ersion-to-510.1.0

Update README to specify version 510.1.0 for building from source
Fix comment for multiElementCollectionTrailingCommas
Pretty-print `@_originallyDefinedIn` with the correct spacing.
…arguments

Fix @_originallyDefinedIn argument spacing
With attribute such as `@_documentation(visibility: private)`, swift-format incorrectly prints no spacing between `visibility` and `private`.
…ty-printing

Fix incorrect spacing when pretty-printing @_documentation
Fix link to Configuration.md
You wouldn't normally allow a line break just before the comma in a
parameter list, but if the preceding line is an #endif, we have to
include the break or we'll generate invalid code.
Remove check for prioritizeKeepingFunctionOutputTogether on enum decl.
…ng-endif

Make sure there is a break after an #endif.
Merge adjacent .line and .docLine comments into a single element.
bnbarham and others added 29 commits January 10, 2025 09:41
swift-format#883 fixed outputting incorrect line numbers, but introduced
a performance regression. swift-format#901 improved this back to around
the original, but had to be reverted as it introduced a an issue due to
counting codepoints rather than characters.

Introduce a similar optimization again, but only for the first portion
of the string (prior to the last newline).

Fixes swift-format#894 again.
* `UnicodeScalar(_:)` on arbitrary UTF8 code point was wrong. It only
  works correctly if the code point is < 0x80
* `UnicodeScalar.Properties.isWhitespace` is slow. Profiling 'lint'
  shows it's taking 13.6 of the entire time
* Whitespaces in Unicode "Basic Latin" block are well defined, there's
  no need to consult `UnicodeScalar.Properties`
[Perf][WhitespaceLinter] Use hand crafted "is whitespace" function
Gradually deprecate running swift-format without input paths; require '-' for stdin in the future
Documented missing config values in `Configuration.md`. Added the same description as inside inline docs. 

Documented values: 
* `fileScopedDeclarationPrivacy`
* `indentSwitchCaseLabels`
* `noAssignmentInExpressions`
* `reflowMultilineStringLiterals`
Looks like GitHub updated Visual Studio on their Windows runners and the new SDK causes compilation issues. Run in a Docker container so we fully control the version of Visual Studio installed.
[6.1] Run Windows tests inside a Docker container
This will make swift-format more tolerant with regard to which swift-argument-parser version it needs, resulting in fewer version conflicts for packages that depend on swift-format.
Signed-off-by: Deepak Raj H R <[email protected]>
Signed-off-by: Tushar Sadhwani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.