Skip to content

v1.7.0

Latest

Choose a tag to compare

@github-actions github-actions released this 24 Nov 18:07
· 2 commits to main since this release
9d64bfc

Highlights

Behavior changes

  • Subscripts with a shorthand getter (subscript(i: Int) -> T { ... }) are now
    reported, named subscript. Function counts and averages change for code
    that has them, and a threshold gate can fail on a subscript that was
    previously skipped. (#58, #60)
  • Explicit subscript accessors, previously reported as a bare get / set,
    are now named subscript.get / subscript.set. (#58, #60)
  • A // swift-complexity:disable comment above a subscript or property whose
    accessors are written out (get/set, or willSet/didSet observers) now
    applies to each accessor. Previously it had to be written above every
    accessor. (#60)

New features

  • JSON and XML output report where each function ends: endLocation in JSON,
    end-line / end-column in XML. The position is just past the closing
    brace. SARIF and Xcode diagnostics still report only where the declaration
    starts. (#58, #60)

Installation

CLI Tool (SwiftComplexityCLI)

Download the appropriate binary for your platform:

  • macOS Apple Silicon (M1/M2/M3): SwiftComplexityCLI-1.7.0-macos-arm64.tar.gz
  • macOS Intel: SwiftComplexityCLI-1.7.0-macos-x86_64.tar.gz
  • Linux x86_64: SwiftComplexityCLI-1.7.0-linux-x86_64.tar.gz
  • Linux arm64: SwiftComplexityCLI-1.7.0-linux-aarch64.tar.gz
tar -xzf SwiftComplexityCLI-1.7.0-*.tar.gz
cd SwiftComplexityCLI-1.7.0-*
./install.sh

MCP Server (SwiftComplexityMCP)

Download the MCP server for LLM agent integration:

  • macOS Apple Silicon (M1/M2/M3): SwiftComplexityMCP-1.7.0-macos-arm64.tar.gz
  • macOS Intel: SwiftComplexityMCP-1.7.0-macos-x86_64.tar.gz
  • Linux x86_64: SwiftComplexityMCP-1.7.0-linux-x86_64.tar.gz
  • Linux arm64: SwiftComplexityMCP-1.7.0-linux-aarch64.tar.gz
tar -xzf SwiftComplexityMCP-1.7.0-*.tar.gz
cd SwiftComplexityMCP-1.7.0-*
./install.sh

Artifact Bundle (nest)

nest install fummicc1/swift-complexity

Or download the artifact bundle directly:

  • SwiftComplexityCLI: swift-complexity.artifactbundle.zip
  • SwiftComplexityMCP: swift-complexity-mcp.artifactbundle.zip

Build from Source

git clone https://github.com/fummicc1/swift-complexity.git
cd swift-complexity
git checkout v1.7.0
# --traits IndexStore enables LCOM4 and coupling (off by default)
swift build -c release --traits IndexStore

Verification

shasum -a 256 -c SwiftComplexityCLI-1.7.0-*.tar.gz.sha256
shasum -a 256 -c SwiftComplexityMCP-1.7.0-*.tar.gz.sha256
shasum -a 256 -c swift-complexity.artifactbundle.zip.sha256
shasum -a 256 -c swift-complexity-mcp.artifactbundle.zip.sha256

What's Changed

Breaking Changes

  • Report where each function ends, and detect shorthand subscripts by @ysa23 in #60

Other Changes

  • Refuse a final version marked as pre-release, and the reverse by @fummicc1 in #65
  • Skip PR comment steps on pull requests from forks by @fummicc1 in #66

Full Changelog: v1.6.0...v1.7.0