title: pylint protection against self-assignment
body: <p>I have this test file:</p>
  
  <pre class="lang-py prettyprint-override"><code>"""module docstring"""
  
  
  class Aclass:
      """class docstring"""
  
      def __init__(self, attr=None, attr2=None):
          self.attr = attr
          self.attr2 = attr2
  
      def __repr__(self):
          return 'instance_of the Aclass {self.attr}.'
  
      def __str__(self):
          return 'The A with: {self.attr}.'
  
  
  def init_a():
      """function docstring"""
      a_inst = Aclass()
      attr = 1
      attr2 = 2
      a_inst.attr2 = attr2
      # should be: a_inst.attr = attr, but have a typo
      attr = attr
  </code></pre>
  
  <p>and I inspect it using pylint, and the output shows everything is alright.</p>
  
  <pre class="lang-sh prettyprint-override"><code>$ pylint test.py 
  
  --------------------------------------------------------------------
  Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)
  </code></pre>
  
  <p>Based on the <a href="https://stackoverflow.com/questions/8503559/what-is-linting">linting</a>, i expect the flag about suspicious usage in software language, because i don't know when this code <code>a=1; a=a</code> can be useful.
  And I want to see some warning, for example:  unused variable or self-assignment  etc. Is there way using the pylint? (I know about Pycharm and sonarqube). Example of the <a href="https://sbforge.org/sonar/rules/show/findbugs:SA_LOCAL_SELF_ASSIGNMENT?layout=false" rel="nofollow noreferrer">sonar rules</a>.</p>
  
  <pre><code>public void foo() {
      int x = 3;
      x = x;
  }
  
  Such assignments are useless, and may indicate a logic error or typo.
  </code></pre>
  
  <p>details about the <code>pylint</code></p>
  
  <pre><code>pylint 2.3.1
  astroid 2.2.5
  Python 3.6.5 (default, May  5 2019, 22:05:54) 
  [GCC 6.3.0 20170516]
  </code></pre>
  
  <p><strong>UPDATE</strong> Has added to the version <a href="http://pylint.pycqa.org/en/latest/whatsnew/2.4.html" rel="nofollow noreferrer">pylint 2.4</a></p>