Skip to content
SPECIFICTION
Get listed

clang-format vs swift-format

clang-format

clang.llvm.org

swift-format

github.com

Side by side

Figureclang-formatswift-format
Price from—Free
Free plan—Yes
Free trial——
Open source——
WindowsYes—
macOSYesYes
LinuxYesYes
iOS—Yes
Plans published01
Spec score · Code formatters7.7 (#8)7.3 (#15)
Spec score · Code Formatting Tools7.6 (#20)7.4 (#27)
ConfigurationFormatting styles can be set with command-line options or project-level .clang-format or _clang-format files.Users can customize supported behavior with a JSON configuration file, and the tool searches parent directories for a .swift-format file.
LicenseLLVM releases are distributed under the Apache-2.0 license with LLVM exceptions, which the download page describes as OSI-approved.The repository identifies its license as Apache-2.0.
PurposeClangFormat is a set of tools built on LibFormat for formatting source code, available as a standalone tool and through editor integrations.swift-format provides formatting technology for Swift source code and building blocks for code formatting transformations.

Plans

clang-format

No plans published.

clang-format pricing →

swift-format

  • swift-formatFree

swift-format pricing →

In their own words

clang-format

clang-format has no write-up on Specifiction yet; its figures are above.

Visit clang.llvm.org

swift-format

swift-format has no write-up on Specifiction yet; its figures are above.

Visit github.com