woshiccm / Pecker

CodePecker is a tool to detect unused Swift code.
MIT License
1.46k stars 63 forks source link

Request: pecker:ignore support for for top-level extensions #36

Closed noahsark769 closed 4 years ago

noahsark769 commented 4 years ago

Currently it's possible to pecker:ignore classes/structs/enums, but not extensions. For example:

class IgnoreInExtensionExample {

}

// pecker:ignore
extension IgnoreInExtensionExample {
    func unused() {

    }
}

In this example, unused() is still reported as unused, even though the intention was to ignore it. This feature is nice to have because we have a bunch of extensions for base XCTestCase classes.

noahsark769 commented 4 years ago

ah, sorry, this is what pecker:ignore all is for. Closing this.