<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <br>
    <div class="moz-cite-prefix">On 26.01.2016 14:16, Martin Basti
      wrote:<br>
    </div>
    <blockquote cite="mid:56A771B8.1000803@redhat.com" type="cite">
      <br>
      <br>
      On 20.01.2016 14:38, Jan Cholasta wrote:
      <br>
      <blockquote type="cite">Hi,
        <br>
        <br>
        On 19.1.2016 13:43, Martin Basti wrote:
        <br>
        <blockquote type="cite">New pylint version will broke our custom
          make-lint script again,
          <br>
          attached patch migrates make-lint to:
          <br>
          * config file
          <br>
          * pylint plugin
          <br>
          which are supported by pylint and should not have regular
          compatibility
          <br>
          issues
          <br>
          <br>
          to test new approach run ./make-lint2
          <br>
          <br>
          Advantages:
          <br>
          * compatibility with pylint
          <br>
          * works on both pylint-1.4.3-3.fc23.noarch and
          pylint-1.5.2-1.fc24.noarch
          <br>
          * pylint plugin works in different way than the previous
          custom checker.
          <br>
          Missing ("dynamic") attributes are added to abstract syntax
          tree instead
          <br>
          of ignoring them and all their sub-members. This makes check
          better,
          <br>
          pylint can detect more typos in tests configurations, api,
          env, etc..
          <br>
          <br>
          Disadvantages:
          <br>
          * any new attribute in api, test config, etc.. must be added
          to
          <br>
          definition of missing members (pylint plugin) - this should
          not happen
          <br>
          too often
          <br>
        </blockquote>
        <br>
        1) Please "mv pylint_plugins/fix_ipa_members.py
        pylint_plugins.py" and "rm -rf pylint_plugins/", no need for
        this redundant directory structure.
        <br>
        <br>
        2) Rename pylintrc to freeipa.pylintrc so you have to always
        specify it explicitly with --rcfile.
        <br>
        <br>
        3) Use the load-plugins directive in freeipa.pylintrc to load
        the plugins rather than --load-plugins.
        <br>
        <br>
        4) Instead of running pylint twice, run it only once with both
        normal and Python 3 checks enabled:
        <br>
        <br>
            [MESSAGE CONTROL]
        <br>
            enable=all,python3
        <br>
            disable=...,no-absolute-import
        <br>
        <br>
        <blockquote type="cite">
          <br>
          <br>
          Q&TODO:
          <br>
          * make-lint: should it be just bash script or rather python
          script?
          <br>
        </blockquote>
        <br>
        IMO neither, it should be a make target (make lint).
        <br>
        <br>
        <blockquote type="cite">* add dynamic detection of python files
          to be checked
          <br>
        </blockquote>
        <br>
        You can use "find . -type f -executable ! -path \*/.\* ! -name
        \*.py\* -exec grep -lsm1 '^#!.*\bpython' \{\} \;".
        <br>
        <br>
        <blockquote type="cite">* should I keep the current options from
          original make-lint?
          <br>
        </blockquote>
        <br>
        No, but allow pylint options to be overridable (make lint
        PYLINTFLAGS="--disable=python3")
        <br>
        <br>
        <blockquote type="cite">* several false positive errors I
          haven't been able to fix in plugin
          <br>
          yet, in worst case they can be locally disabled:
          <br>
        </blockquote>
        <br>
        Disable them locally.
        <br>
        <br>
        Honza
        <br>
        <br>
      </blockquote>
      Updated patch attached.
      <br>
      <br>
      Please note that make-lint script has been removed, to execute
      lint check use 'make lint'
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <br>
    Updated patch attached:<br>
    * fixes recently added error<br>
    * fixes PEP8 <br>
    * cleanup of pylint config file<br>
    <br>
    Patch is only for master branch, for 4.3 and 4.2 I will send
    different patches when this will be acked<br>
  </body>
</html>