title: How to Exclude Files/Folders for SwiftLint Using CocoaPods?
body: <h1>The Problem</h1>
  
  <p>When building my xcode Swift project, I am getting violations from SwiftLint (i.e. Empty Count Violations) of files/folders that I exclude in my .swiftlint.yml file, but when specifying those files/folders in the <code>excluded</code> section, the violations still occur.</p>
  
  <h2>Code</h2>
  
  <p><strong>.swiftlint.yml</strong></p>
  
  <pre><code>included:
  
  excluded:
    - Pods
    - myproject/API/api_implementation.swift
    - myproject/API
  </code></pre>
  
  <p><strong>Build Phases Run Script</strong></p>
  
  <pre><code>"${PODS_ROOT}/SwiftLint/swiftlint"
  </code></pre>
  
  <p><strong>Project Structure</strong></p>
  
  <pre><code>/projectroot
      .swiftlint.yml
      Pods/
      myproject/
          API/
              api_implementation.swift
  </code></pre>
  
  <p>Neither <code>myproject/API/api_implementation.swift</code> nor the entire directory <code>myproject/API/</code> are excluded from the lint!</p>
  
  <h1>The Question</h1>
  
  <p>What is incorrect in terms of making this file and folder excluded from the lint? If my syntax is incorrect, what is the correct syntax? If my path is incorrect, where is the SwiftLint file run from? Interestingly, even though the .swiftlint.yml file is in the root of my project, the swiftlint file that is run is in Pods/SwiftLint/</p>
  
  <p>Perhaps the way that Cocoapods requires additional integration for SwiftLint to work would cause this problem. I have tried, however, to empty the Build Phases Run Script, and have confirmed that the .swiftlint.yml file is indeed running on build.</p>
  
  <p>Any help or thoughts would be appreciated!</p>