Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Swift",
"image": "swiftlang/swift:nightly-6.1-jammy",
"image": "swift:6.2",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": "false",
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/swift-6.0/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Swift",
"name": "Swift 6.0",
"image": "swift:6.0",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
Expand Down
4 changes: 2 additions & 2 deletions .devcontainer/swift-6.1/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Swift",
"image": "swiftlang/swift:nightly-6.1-jammy",
"name": "Swift 6.1",
"image": "swift:6.1",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": "false",
Expand Down
40 changes: 40 additions & 0 deletions .devcontainer/swift-6.2/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "Swift 6.2",
"image": "swiftlang/swift:6.2",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": "false",
"username": "vscode",
"upgradePackages": "false"
},
"ghcr.io/devcontainers/features/git:1": {
"version": "os-provided",
"ppa": "false"
}
},
"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined"
],
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"lldb.library": "/usr/lib/liblldb.so"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"sswg.swift-lang"
]
}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "root"
}
40 changes: 40 additions & 0 deletions .devcontainer/swift-6.3/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "Swift 6.3",
"image": "swiftlang/swift:nightly-6.3-jammy",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": "false",
"username": "vscode",
"upgradePackages": "false"
},
"ghcr.io/devcontainers/features/git:1": {
"version": "os-provided",
"ppa": "false"
}
},
"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined"
],
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"lldb.library": "/usr/lib/liblldb.so"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"sswg.swift-lang"
]
}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "root"
}
16 changes: 8 additions & 8 deletions .swift-format
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"spaces" : 2
},
"indentConditionalCompilationBlocks" : true,
"indentSwitchCaseLabels" : true,
"lineBreakAroundMultilineExpressionChainComponents" : true,
"lineBreakBeforeControlFlowKeywords" : true,
"lineBreakBeforeEachArgument" : true,
"lineBreakBeforeEachGenericRequirement" : true,
"indentSwitchCaseLabels" : false,
"lineBreakAroundMultilineExpressionChainComponents" : false,
"lineBreakBeforeControlFlowKeywords" : false,
"lineBreakBeforeEachArgument" : false,
"lineBreakBeforeEachGenericRequirement" : false,
"lineLength" : 100,
"maximumBlankLines" : 1,
"multiElementCollectionTrailingCommas" : true,
Expand All @@ -26,7 +26,7 @@
"AlwaysUseLiteralForEmptyCollectionInit" : false,
"AlwaysUseLowerCamelCase" : true,
"AmbiguousTrailingClosureOverload" : true,
"BeginDocumentationCommentWithOneLineSummary" : true,
"BeginDocumentationCommentWithOneLineSummary" : false,
"DoNotUseSemicolons" : true,
"DontRepeatTypeInStaticProperties" : true,
"FileScopedDeclarationPrivacy" : false,
Expand All @@ -42,7 +42,7 @@
"NoCasesWithOnlyFallthrough" : true,
"NoEmptyTrailingClosureParentheses" : true,
"NoLabelsInCasePatterns" : true,
"NoLeadingUnderscores" : false,
"NoLeadingUnderscores" : true,
"NoParensAroundConditions" : true,
"NoPlaygroundLiterals" : true,
"NoVoidReturnOnFunctionSignature" : true,
Expand All @@ -67,4 +67,4 @@
"spacesAroundRangeFormationOperators" : false,
"tabWidth" : 2,
"version" : 1
}
}
65 changes: 41 additions & 24 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
opt_in_rules:
- array_init
- attributes
- closure_body_length
- closure_end_indentation
- closure_spacing
Expand All @@ -22,14 +21,15 @@ opt_in_rules:
- explicit_acl
- explicit_init
- explicit_top_level_acl
- fallthrough
# - fallthrough
- fatal_error_message
- file_name
- file_name_no_space
- file_types_order
- first_where
- flatmap_over_map_reduce
- force_unwrapping
- function_default_parameter_at_end
# - function_default_parameter_at_end
- ibinspectable_in_extension
- identical_operands
- implicit_return
Expand All @@ -41,8 +41,9 @@ opt_in_rules:
- legacy_random
- literal_expression_end_indentation
- lower_acl_than_parent
#- missing_docs
- missing_docs
- modifier_order
- multiline_arguments
- multiline_arguments_brackets
- multiline_function_chains
- multiline_literal_brackets
Expand All @@ -56,7 +57,6 @@ opt_in_rules:
- optional_enum_case_matching
- overridden_super_call
- override_in_extension
- pattern_matching_keywords
- prefer_self_type_over_type_of_self
- prefer_zero_over_explicit_init
- private_action
Expand All @@ -74,48 +74,65 @@ opt_in_rules:
- sorted_first_last
- sorted_imports
- static_operator
- strict_fileprivate
- strong_iboutlet
- toggle_bool
# - trailing_closure
- type_contents_order
- unavailable_function
- unneeded_parentheses_in_closure_argument
- unowned_variable_capture
- untyped_error_in_catch
- vertical_parameter_alignment_on_call
- vertical_whitespace_between_cases
- vertical_whitespace_closing_braces
- vertical_whitespace_opening_braces
- xct_specific_matcher
- yoda_condition
disabled_rules:
- trailing_comma
- strict_fileprivate
- function_default_parameter_at_end
- switch_case_alignment
analyzer_rules:
- unused_import
- unused_declaration
cyclomatic_complexity:
- 6
- 8
type_body_length:
- 125
- 200
- 12
file_length:
- 250
- 300
warning: 225
error: 300
function_body_length:
- 25
- 35
- 50
- 76
function_parameter_count: 8
line_length:
- 90
- 90
- 100
- 200
closure_body_length:
- 50
- 60
identifier_name:
excluded:
- id
- completeFileProtectionUntilFirstUserAuthentication
- no
excluded:
- DerivedData
- .build
- .swiftpm
- Mint
- Examples
indentation_width:
indentation_width: 2
file_name:
severity: error
fatal_error_message:
severity: error
disabled_rules:
- nesting
- implicit_getter
- switch_case_alignment
- closure_parameter_position
- trailing_comma
- opening_brace
- optional_data_string_conversion
- pattern_matching_keywords
custom_rules:
no_unchecked_sendable:
name: "No Unchecked Sendable"
regex: '@unchecked\s+Sendable'
message: "Use proper Sendable conformance instead of @unchecked Sendable to maintain strict concurrency safety"
severity: error
6 changes: 3 additions & 3 deletions Mintfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
swiftlang/swift-format@600.0.0
realm/SwiftLint@0.58.0
peripheryapp/periphery@2.20.0
swiftlang/swift-format@602.0.0
realm/SwiftLint@0.62.2
peripheryapp/periphery@3.2.0
Comment on lines +1 to +3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

SwiftLint 0.59.0 0.60.0 0.61.0 0.62.0 0.62.2 breaking changes new rules

💡 Result:

Summary of notable breaking changes and new/renamed rules in SwiftLint 0.59.0 → 0.62.2

  • 0.59.0

    • Breaking: removed tracking of correction positions; SwiftLint now prints number of corrections instead. [1]
  • 0.60.0

    • Breaking:
      • Removed boolean support for the validates_start_with_lowercase option — use severity values (off/warning/error). [1][2]
      • Requires macOS 13+ to run. [1][2]
      • swiftlint_linux.zip renamed to swiftlint_linux_amd64.zip (arm64 added separately). [1][2]
      • redundant_optional_initialization replaced by implicit_optional_initialization (redundant_optional_initialization remains an alias). [1][2]
  • 0.61.0

    • Breaking:
      • If SWIFTLINT_DISABLE_SOURCEKIT is set to block loading libsourcekitdInProc, SourceKit‑dependent rules are disabled and a warning is printed per rule. [1]
      • operator_whitespace rule removed and merged into function_name_whitespace (which gained additional spacing checks and autocorrect). [1]
  • 0.62.0

    • Breaking:

      • SwiftLint now requires Swift 6+ to build. (SPM plugins still work down to Swift 5.9.) [1]
      • The SwiftLintBinary.artifactbundle.zip internal structure/path layout simplified (affects Xcode Run Script path usage). [1]
      • sorted_imports behavior changed: imports directly adjacent are treated as a group; groups separated by non-imports or blank lines remain separate; comments attach to their import group. [1]
    • New rule (added in 0.62.0):

      • prefer_asset_symbols (suggest using asset symbols vs string image names). [1]
  • 0.62.2

    • New rule:
      • incompatible_concurrency_annotation (flags declarations that need @preconcurrency to stay Swift 5 compatible). [3]
    • Enhancements:
      • modifier_order: added isolation modifier group to configure nonisolated position. [3]
    • Bug fixes: several fixes to sorted_imports correction and closure_end_indentation handling of #Preview macros. [3]

Sources:

  • SwiftLint release notes (GitHub Releases). [1]
  • SwiftLint 0.60.0 release details. [2]
  • SwiftLint 0.62.2 release details. [3]

If you want I can paste the exact release-note lines or link to each release.


🌐 Web query:

periphery 3.0.0 breaking changes migration from 2.x

💡 Result:

Summary of Periphery 3.0.0 breaking changes and migration steps

Breaking changes

  • Periphery 3.0 changes how files are selected: it now scans all source files referenced in the index store (no more explicit --targets). The --targets option is removed. [1]
  • --workspace removed; use --project for both .xcworkspace and .xcodeproj. [1]
  • CocoaPods installer support removed. [2]
  • Swift 5.9 / Xcode 15.2 support removed. [2]
  • Homebrew distribution moved to the official Homebrew repo (peripheryapp/periphery tap is deprecated). [1][2]
  • Bazel support changed: file-targets-path removed; use built-in Bazel support and the --bazel option (and add periphery dep to MODULE.bazel). [1]

Key migration actions

  • Replace any use of --targets by configuring file exclusions (see README Excluding Files) or rely on the new index-store-based scanning. [1]
  • Replace --workspace with --project in scripts/CI. [1]
  • If you installed via the old Homebrew tap, remove/untap and reinstall from official Homebrew:
    brew remove periphery
    brew untap peripheryapp/periphery
    brew update
    brew install periphery. [2]
  • If you used CocoaPods to install Periphery, switch to Homebrew, Mint, or another supported installer. [2]
  • For Bazel users, remove -—file-targets-path usage and follow the MODULE.bazel instructions, then run scans with --bazel. [1]
  • Verify your Xcode/Swift toolchain compatibility (Swift 5.9 / Xcode 15.2 no longer supported by Periphery 3.0). [2]

References

  • 3.0 Migration Guide (peripheryapp/periphery wiki). [1]
  • GitHub Releases — 3.0.0 release notes. [2]
  • periphery README (usage / indexing behavior). [3]

🏁 Script executed:

# Check if .swiftlint.yml references operator_whitespace (removed in 0.61.0)
find . -name ".swiftlint.yml" -o -name ".swiftlint.yaml" | head -5

Repository: brightdigit/RadiantKit

Length of output: 82


🏁 Script executed:

# Check how periphery is configured (look for scripts/config that use --targets)
find . -type f \( -name "Mintfile" -o -name "*.sh" -o -name "*.yml" -o -name "*.yaml" \) | xargs grep -l "periphery" 2>/dev/null | head -10

Repository: brightdigit/RadiantKit

Length of output: 76


🏁 Script executed:

cat .swiftlint.yml

Repository: brightdigit/RadiantKit

Length of output: 3318


🏁 Script executed:

# Check for periphery configuration or usage in build scripts/ci
grep -r "periphery" . --include="*.sh" --include="*.yml" --include="*.yaml" -A 2 -B 2 2>/dev/null | head -50

Repository: brightdigit/RadiantKit

Length of output: 48


Verify compatibility and configuration updates for dependency upgrades.

The dependency versions are being updated significantly with breaking changes:

  • swift-format: 600.0.0 → 602.0.0 (minor version bump)
  • SwiftLint: 0.58.0 → 0.62.2 (breaking changes across multiple versions: 0.60.0 requires macOS 13+; 0.61.0 removes operator_whitespace rule; 0.62.0 requires Swift 6+ to build, changes sorted_imports behavior)
  • periphery: 2.20.0 → 3.2.0 (major version bump with breaking changes: --targets removed, --workspace removed, CocoaPods support dropped)

SwiftLint considerations:

  • .swiftlint.yml includes sorted_imports, which has behavior changes in 0.62.0 (adjacency grouping, comment attachment). Verify imports remain correctly organized after upgrade.
  • SwiftLint 0.62.2 adds a new incompatible_concurrency_annotation rule. If enabled or discovered, it could flag Swift 5 code lacking proper concurrency annotations.
  • SwiftLint 0.62.0+ requires Swift 6+ to build. Confirm your Xcode toolchain and build environment support this.

Periphery considerations:

  • Periphery 3.0.0 removes --targets and --workspace options. Verify any build scripts or CI configurations have been updated accordingly, or rely on the new index-store-based file scanning.
  • If the project uses CocoaPods for Periphery installation, switch to Homebrew, Mint, or another supported installer.

Confirm that the "0 violations" claim holds after running lint and analysis checks with these new versions.

🤖 Prompt for AI Agents
In @Mintfile around lines 1 - 3, Update CI/tooling and config to account for the
upgraded Mintfile deps: ensure the Xcode/swift toolchain is Swift 6+ before
upgrading swift-format to 602.0.0 and SwiftLint to 0.62.2, update .swiftlint.yml
to handle the changed sorted_imports behavior and add/opt-out
incompatible_concurrency_annotation if you must support older concurrency
semantics, and test/rerun swift-format to verify import ordering; for periphery
3.2.0 remove usages of the removed flags (--targets, --workspace) in any scripts
or CI and switch installation method away from CocoaPods if used (use
brew/mint), then run the full lint and periphery analysis with the new versions
and confirm the project still reports 0 violations, adjusting configs or code
until it does.

3 changes: 2 additions & 1 deletion Sources/RadiantDocs/CodablePackageDocument.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
configuration.existingFile ?? FileWrapper(directoryWithFileWrappers: [:])

if let oldConfigJSONWrapper = rootFileWrapper
.fileWrappers?[T.configurationFileWrapperKey] {
.fileWrappers?[T.configurationFileWrapperKey]
{
rootFileWrapper.removeFileWrapper(oldConfigJSONWrapper)
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/RadiantDocs/Primitives/FileType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public struct FileType: Hashable, ExpressibleByStringLiteral, Sendable {
/// - Parameters:
/// - utIdentifier: The Uniform Type Identifier (UTI) for the file type.
/// - isOwned: A boolean indicating whether the file type is owned.
/// - fileExtension: The optional file extension associated with the file type.
/// - fileExtension: The optional file extension associated with the file type.
public init(utIdentifier: String, isOwned: Bool, fileExtension: String? = nil) {
self.utIdentifier = utIdentifier
self.isOwned = isOwned
Expand Down
4 changes: 2 additions & 2 deletions Sources/RadiantDocs/Primitives/InitializablePackage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ extension InitializablePackage {
/// - Parameters:
/// - fileURL: The URL at which to create the package.
/// - encoder: The JSON encoder to use for encoding the package.
/// - options: The options to use when creating the package. Defaults to
/// `.none`.
/// - options: The options to use when creating the package. Defaults to
/// `.none`.
///
/// - Returns: The newly created instance of the package.
///
Expand Down
12 changes: 9 additions & 3 deletions Sources/RadiantDocs/Primitives/InitializablePackageOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

public import Foundation

/// Options for controlling how package files are written and protected.
public struct InitializablePackageOptions: OptionSet, Sendable {
/// An option to write data to an auxiliary file first and
/// then replace the original file
Expand All @@ -46,10 +47,12 @@ public struct InitializablePackageOptions: OptionSet, Sendable {
/// or the file is already open.
public static let completeFileProtectionUnlessOpen =
InitializablePackageOptions(rawValue: 1 << 4)
// swiftlint:disable identifier_name
/// An option to allow the file to be accessible after a user first unlocks the
/// device.
public static let completeFileProtectionUntilFirstUserAuthentication =
InitializablePackageOptions(rawValue: 1 << 5)
// swiftlint:enable identifier_name
/// An option the system uses when determining the file protection options that
/// the system assigns to the data.
public static let fileProtectionMask = InitializablePackageOptions(rawValue: 0x0F << 2)
Expand All @@ -58,21 +61,24 @@ public struct InitializablePackageOptions: OptionSet, Sendable {
public static let withIntermediateDirectories =
InitializablePackageOptions(rawValue: 1 << 6)
// Common combinations
/// No options enabled.
public static let none: InitializablePackageOptions = []
/// The raw integer value representing the option set.
public let rawValue: Int
/// Returns true if the withIntermediateDirectories option is enabled
public var withIntermediateDirectoriesIsEnabled: Bool {
contains(.withIntermediateDirectories)
}
/// Creates an option set with the specified raw value.
///
/// - Parameter rawValue: The raw integer value for the option set.
public init(rawValue: Int) { self.rawValue = rawValue }
}

extension Data.WritingOptions {
/// Initialize Data.WritingOptions from InitializablePackageOptions
/// - Parameter options: The `InitializablePackageOptions`
/// to convert to `Data.WritingOptions`
/// - Returns: The `Data.WritingOptions` equivalent
/// of the provided `InitializablePackageOptions`
/// to convert to `Data.WritingOptions`
public init(options: InitializablePackageOptions) {
var dataOptions: Data.WritingOptions = []
if options.contains(.atomic) { dataOptions.insert(.atomic) }
Expand Down
3 changes: 2 additions & 1 deletion Sources/RadiantDocs/UTType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
if fileType.isOwned { types.append(.init(exportedAs: fileType.utIdentifier)) }

if let fileExtensionType =
fileType.fileExtension.flatMap({ UTType(filenameExtension: $0) }) {
fileType.fileExtension.flatMap({ UTType(filenameExtension: $0) })
{
types.append(fileExtensionType)
}

Expand Down
Loading
Loading