Skip to content
SPECIFICTION
Get listed

PMD vs SwiftLint

PMD

pmd.github.io

SwiftLint

realm.github.io

Side by side

FigurePMDSwiftLint
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
WindowsYesYes
macOSYesYes
LinuxYesYes
Self-hostedYes—
Plans published11
Spec score · Linters8.3 (#6)8.0 (#11)
Built-in rulesPMD includes more than 400 built-in rules and supports custom rules written in Java or XPath.SwiftLint includes over 200 rules, and opt-in rules are disabled by default.
LicenseThe project identifies its license as BSD-style.The GitHub repository identifies SwiftLint as MIT licensed.
PurposePMD is an extensible cross-language static code analyzer that finds common programming flaws.SwiftLint enforces Swift style and conventions based on rules generally accepted by the Swift community.
SupportThe project directs users to Stack Overflow for questions, GitHub issues for suspected bugs or requests, and Gitter for quick questions.The maintainers ask users to support the project by contributing, reporting issues, and helping the community, and note that volunteer time is limited.

Plans

PMD

  • PMDFree

PMD pricing →

SwiftLint

  • SwiftLintFree

SwiftLint pricing →

In their own words

PMD

PMD is a free, extensible static code analyzer that checks source code for programming flaws such as unused variables, empty catch blocks, and unnecessary object creation. It includes more than 400 built-in rules, and teams can write custom rules in Java or XPath. Its bundled CPD tool finds duplicated code across many programming languages. PMD checks source directories from the command line and can run as a Maven, Ant, Gradle, or bld build operation. Supported languages include Java, JavaScript, Salesforce Apex and Visualforce, Kotlin, Swift, Modelica, PL/SQL, Apache Velocity, JSP, WSDL, Maven POM, HTML, XML, and XSL; Scala is supported without Scala rules. It runs on Linux, macOS, and Windows and requires Java 8 or above. For CI, its GitHub Action can create SARIF reports and fail builds based on violation counts; documentation also covers GitLab, Jenkins, and Bamboo integrations. IDE integrations include Eclipse, IntelliJ IDEA, and Visual Studio Code, though some listed plugins are not actively maintained. Only the latest major version is actively developed.

Visit pmd.github.io

SwiftLint

SwiftLint is a free, MIT-licensed tool that checks Swift source against style rules and conventions accepted by the Swift community. It includes more than 200 built-in rules, with opt-in rules disabled by default. A project can set active rules, included and excluded paths, and rule settings in a `.swiftlint.yml` file. SwiftLint can automatically correct some violations, overwriting affected files, and its command line supports linting, analysis, baselines, rule listings, and multiple reporters. Documented integrations include Xcode and Swift Package Manager plugins, pre-commit, Fastlane, Docker, Visual Studio Code, and MegaLinter. Installation choices include package managers, prebuilt packages, and source builds. Releases include macOS, Windows, and Linux binaries. SwiftLint is intended for valid, compilable source, and non-compiling code may produce unexpected results, especially when autocorrecting. Analyzer rules are considerably slower than lint rules. The project is maintained by volunteers, and the maintainers describe it as non-commercial.

Visit realm.github.io