SwiftLint doesn't recognize changes to .swiftlint.yml
<p>I'm using SwiftLint in a custom build phase in Xcode:</p>

<pre><code>if which swiftlint &gt;/dev/null; then
    swiftlint autocorrect --format
    swiftlint
else
    echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
fi
</code></pre>

<p>Xcode must have recognized the .swiftlint.yml in my project folder over the past month since i created it, because it warned me about custom rules I added. Now I have deleted two custom rules from the yml-file, but Xcode keeps on warning me about those.</p>

<p>I tried the following things and am out of clues what to try:</p>

<ul>
<li>Uninstall and install Swiftlint (using Homebrew)</li>
<li>Adding the deleted rule names to the <code>disabled_rules</code> in .swiftlint.yml</li>
<li>Deleting .swiftlint.yml and adding it again</li>
</ul>

<p>The only workaround I could come up with is adding a line <code>// swiftlint:disable &lt;rule1&gt; &lt;rule2&gt; &lt;rule3&gt;</code> to each file, but that can't be considered a real solution, so for now I commented out swiftlint in the Xcode build phase. Any suggestions are highly appreciated ...</p>

<hr>

<p>EDIT: swiftlint.yml contents</p>

<pre><code>disabled_rules: # rule identifiers to exclude from running
  - colon # exaclty one space after the : &gt;&gt;&gt; let abc: Void\n
  - todo # TODO can be written in the code but should be linked to a ticket on JIRA.
  - nesting # func nesting max 1 level
  - weak_delegate
  - empty_parentheses_with_trailing_closure
  - empty_commented_line
  - missing_brackets_unwrap

excluded: # paths to ignore during linting. overridden by `included`.
  - Carthage
  - Pods
  - External
  - Submodules

# rule parameters
cyclomatic_complexity:
  - 20 #warning
  - 35 #error

file_length:
  - 600 #warning
  - 800 #error

function_body_length:
  - 40 #warning
  - 80 #error

line_length:
  - 300 #warning
  - 350 #error

type_body_length:
  - 400 #warning
  - 500 #error

variable_name:
  min_length: 2 #warning
  max_length: #warning or error
    warning: 40
    error: 50

opt_in_rules:
 # - missing_docs
  - force_unwrapping
  - control_statement
  - private_outlet
  - vertical_whitespace

custom_rules:
  extra_whitespace:
    name: "Extra whitespaces"
    regex: "([a-zA-Z0-9=?.\(\),&gt;&lt;!'\"][ ]{2,}[a-zA-Z0-9?.\(\),&gt;&lt;!'\"])"
    message: "Remove extra whitespaces"
    severity: warning
  comments_space:
    name: "Space After Comment"
    regex: "(^ *//\w+)"
    message: "There should be a space after //"
    severity: warning
  empty_first_line:
    name: "Empty First Line"
    regex: "(^[ a-zA-Z ]*(?:protocol|extension|class|struct) (?!(?:var|let))[ a-zA-Z:]*\{\n *\S+)"
    message: "There should be an empty line after a declaration"
    severity: warning
  empty_line_after_guard:
    name: "Empty Line After Guard"
    regex: "(^ *guard[ a-zA-Z0-9=?.\(\),&gt;&lt;!]*\{[ a-zA-Z0-9=?.\(\),&gt;&lt;!]*\}\n *(?!(?:return|guard))\S+)"
    message: "There should be an empty line after a guard"
    severity: warning
  empty_line_after_super:
    name: "Empty Line After Super"
    regex: "(^ *super\.[ a-zA-Z0-9=?.\(\)\{\}:,&gt;&lt;!]*\n *(?!(?:\}|return))\S+)"
    message: "There should be an empty line after super"
    severity: warning
  multiple_empty_lines:
    name: "Multiple Empty Lines"
    regex: "((?:\s*\n){3,})"
    message: "There are too many empty lines"
    severity: warning
  unnecessary_leading_void_in:
    name: "Unnecessary -&gt; Void in at the end of the line"
    regex: "(-&gt; (Void|\(\)) in$)"
    message: "Unnecessary '-&gt; Void in' at the end of the line. Use only 'in'"
    severity: warning
  unnecessary_type:
    name: "Unnecessary Type"
    regex: "(?sm)[ \ta-zA-Z0-9]?(?:let|var){1} [ \ta-zA-Z0-9]+?:[ \t]+?([a-zA-Z0-9]+?)[\t ]+?=[\t ]?\1"
    message: "Type Definition Not Needed"
    severity: warning
  empty_closure_params:
    name: "Empty closure params"
    regex: "\{ (\(\) -&gt; Void in)$"
    message: "`() -&gt; Void in` should be avoided"
    severity: warning
  invalid_mark_format:
    name: "Invalid MARK Format"
    regex: "(?m-s)(\/\/[\s]*?MARK(?!(\:[\s]{1}\-[\s]{1}){1}))"
    message: "Use format: MARK: - Your Info"
    severity: warning
</code></pre>