Skip to content

Conversation

bnbarham and others added 9 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`
@ahoppen ahoppen merged commit 72fc65f into swiftlang:release/6.1 Feb 5, 2025
19 checks passed
@ahoppen ahoppen deleted the merge-main-6.1-2025-02-04 branch February 5, 2025 01:00
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.

6 participants