peripheryapp / periphery

A tool to identify unused code in Swift projects.
MIT License
5.02k stars 178 forks source link

excluding multiple files not working #716

Closed filipb00 closed 2 months ago

filipb00 commented 4 months ago

Hello, I updated from 2.17.1 to 2.18.0 and noticed a bug when providing multiple paths as exclusion argument.

For example --report-exclude '**/Redux/**/*|**/*Production.swift' wont work (if only one path is given it works)

PS this was working in 2.17.1:

projRelatedGlobs='**/Redux/**/*|**/Production.swift|**/Logger.swift'
projIndependentGlobs='**/*Delegate.swift|**/*Mock.swift|**/*Protocol.swift'

periphery_output_file="$HOME/Documents/periphery_output.txt"

periphery scan --skip-build --index-store-path 'tmp/dd/Index.noindex/DataStore/' --report-exclude "$projRelatedGlobs|$projIndependentGlobs" > "$periphery_output_file"
ileitch commented 2 months ago

2.18.0 updated the argument format to match swift-argument-parser. This was explained in the release notes: https://github.com/peripheryapp/periphery/blob/master/CHANGELOG.md#2180-2024-01-21.

TomQDRS commented 1 month ago

Hi! Just stumbled upon this issue as well, thanks for the explanation here. Would you mind updating the readme? It still mentions one should use the pipe operator to separate excluded files :)