https://github.com/ericodx/swift-cpd
Clone & Pattern Detector tool for Swift and Objective-C/C source code.
https://github.com/ericodx/swift-cpd
cli copy-paste-detector swift swift-package-manager xcode-plugin
Last synced: 25 days ago
JSON representation
Clone & Pattern Detector tool for Swift and Objective-C/C source code.
- Host: GitHub
- URL: https://github.com/ericodx/swift-cpd
- Owner: ericodx
- License: bsd-3-clause
- Created: 2026-02-12T14:08:46.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-02-17T19:50:15.000Z (about 1 month ago)
- Last Synced: 2026-02-17T20:42:58.489Z (about 1 month ago)
- Topics: cli, copy-paste-detector, swift, swift-package-manager, xcode-plugin
- Language: Swift
- Homepage: https://github.com/ericodx/swift-cpd
- Size: 378 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Docs/README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: .github/SECURITY.md
- Governance: Docs/GOVERNANCE.md
Awesome Lists containing this project
README
# Swift CPD Documentation
Documentation for the Swift Clone & Pattern Detector.
---
## Quick Links
| Audience | Document |
|----------|----------|
| **New users** | [Installation](INSTALLATION.md) |
| **CLI users** | [CLI Usage](CLI/Usage.md) |
| **Xcode users** | [Xcode Plugin](Integration/XcodePlugin.md) |
| **Contributors** | [Architecture](Architecture/README.md) |
| **Codebase reference** | [Codebase](Codebase/README.md) |
---
## Documentation Modules
| Module | Description |
|--------|-------------|
| [Installation](INSTALLATION.md) | Homebrew, SPM, and manual build |
| [Architecture](Architecture/README.md) | Pipeline pattern, module dependencies, concurrency model |
| [CLI](CLI/README.md) | Argument parsing, configuration, and exit codes |
| [Codebase](Codebase/README.md) | Module reference: tokenization, detection, reporting, and more |
| [Integration](Integration/README.md) | Xcode plugin and CI/CD workflows |
| [CI](CI/README.md) | GitHub Actions workflows |
---
## Source Structure
```text
Sources/SwiftCPD/
├── Baseline/ Baseline file management
├── Cache/ Tokenization cache with SHA-256
├── CLI/ Argument parsing and configuration
├── Detection/ Clone detection algorithms (Type 1-4)
│ └── SemanticGraph/ AST-based semantic analysis
├── FileDiscovery/ Source file discovery and glob matching
├── Pipeline/ Analysis orchestration
├── Reporting/ Output formatters (text, JSON, HTML, Xcode)
├── Suppression/ Inline suppression scanner
└── Tokenization/ Swift and C-family tokenizers
```