Repository navigation
v1.1.1 — Exclude Pattern Fix
Bug fix for the exclude key in .swift-cpd.yml.
What's new
Bug Fix
- Fixed
excludepatterns in.swift-cpd.ymland--excludehaving no effect when using relative paths or directory paths with a trailing slash - Root cause:
GlobMatcheranchored all patterns with^, making them impossible to match against absolute file paths. Directory patterns ending with/also failed to matchurl.path, which never includes a trailing slash - Relative patterns now match at path-component boundaries anywhere in the absolute file path
- Directory patterns ending with
/now correctly exclude the directory and all files within it, enabling early pruning via
skipDescendants()
Documentation
GlobMatchermatching semantics documented — absolute vs. relative patterns, directory trailing-slash behavior- File discovery flowchart corrected to reflect that
shouldExcludeis evaluated for every enumerated item, including directories excludeYAML reference updated with clarifying comments and a directory-pattern example
Requirements
- macOS 15+
- Swift 6.2+
Installation
See the Installation Guide for Homebrew, pre-built binary, SPM plugin, and git hook setup.
What's Changed
Full Changelog: v1.1.0...v1.1.1