{"action":"created","issue":{"url":"https://api.github.com/repos/OCA/maintainer-quality-tools/issues/232","labels_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/issues/232/labels{/name}","comments_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/issues/232/comments","events_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/issues/232/events","html_url":"https://github.com/OCA/maintainer-quality-tools/pull/232","id":101687279,"number":232,"title":"[IMP] run_pylint: Add feature to check new conventions just in modules changed.","user":{"login":"moylop260","id":6644187,"avatar_url":"https://avatars.githubusercontent.com/u/6644187?v=3","gravatar_id":"","url":"https://api.github.com/users/moylop260","html_url":"https://github.com/moylop260","followers_url":"https://api.github.com/users/moylop260/followers","following_url":"https://api.github.com/users/moylop260/following{/other_user}","gists_url":"https://api.github.com/users/moylop260/gists{/gist_id}","starred_url":"https://api.github.com/users/moylop260/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moylop260/subscriptions","organizations_url":"https://api.github.com/users/moylop260/orgs","repos_url":"https://api.github.com/users/moylop260/repos","events_url":"https://api.github.com/users/moylop260/events{/privacy}","received_events_url":"https://api.github.com/users/moylop260/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OCA/maintainer-quality-tools/labels/needs%20review","name":"needs review","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"moylop260","id":6644187,"avatar_url":"https://avatars.githubusercontent.com/u/6644187?v=3","gravatar_id":"","url":"https://api.github.com/users/moylop260","html_url":"https://github.com/moylop260","followers_url":"https://api.github.com/users/moylop260/followers","following_url":"https://api.github.com/users/moylop260/following{/other_user}","gists_url":"https://api.github.com/users/moylop260/gists{/gist_id}","starred_url":"https://api.github.com/users/moylop260/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moylop260/subscriptions","organizations_url":"https://api.github.com/users/moylop260/orgs","repos_url":"https://api.github.com/users/moylop260/repos","events_url":"https://api.github.com/users/moylop260/events{/privacy}","received_events_url":"https://api.github.com/users/moylop260/received_events","type":"User","site_admin":false},"milestone":null,"comments":37,"created_at":"2015-08-18T15:48:17Z","updated_at":"2015-09-02T17:09:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OCA/maintainer-quality-tools/pulls/232","html_url":"https://github.com/OCA/maintainer-quality-tools/pull/232","diff_url":"https://github.com/OCA/maintainer-quality-tools/pull/232.diff","patch_url":"https://github.com/OCA/maintainer-quality-tools/pull/232.patch"},"body":"Currently, we have a problem that if we add a new conventions in pylint-test-1 we will have all repos red in travis builds for stable branches and PR ones.\r\n\r\nBut currently we are working with next steps:\r\n 1. We have created a new pr to oca/PROJECT-X branch 8.0\r\n 2. We received feedabck from reviewers:\r\n   3. Please, rename the class to `CamelCase`\r\n   4. Please, add OCA author.\r\n   5. Please, change your comment `encondig` by `coding`\r\n   6. Other ones.\r\n\r\nIf we can automate it, Why not automate it?\r\nSave time of reviewer, save time of developers just in new changes.\r\n\r\nThen we need a middle step to add new conventions without have all repos red.\r\nWe can change the modules progressively of new conventions.\r\n\r\nThis feature run with original\r\n`pylint pylint.cfg all_modules`\r\nplus run other one with new conventions in just modified modules\r\n`pylint pylint_PR.cfg modified_modules`\r\n\r\nNew conventions by example\r\n\r\n - CamelCase\r\n\r\nWe don't need wait to fix all repositories in all base branches to add this new convention.\r\nWe can add new conventions and check it just in new changes.\r\nAfter a consider time we can move new conventions to old conventions.\r\n\r\n![travis_feature](https://cloud.githubusercontent.com/assets/6644187/9338522/c3073c18-45aa-11e5-8533-29cc0f61299a.png)\r\n\r\nNotice in `TRAVIS_PULL_REQUEST='true'` case the erros are old_conventions + new_conventions.\r\n\r\nThe old conventions are active in all modules in PR cases.\r\n\r\nWhy `TRAVIS_PULL_REQUEST=\"true\"` and `TRAVIS_BRANCH`?\r\nWe don't have control on travis app :(\r\nTRAVIS_PULL_REQUEST is a [environment variable of travis](http://docs.travis-ci.com/user/environment-variables/#Convenience-Variables)\r\n![environment variables - travis ci 2015-08-21 09-41-33](https://cloud.githubusercontent.com/assets/6644187/9410958/d3e63378-47e8-11e5-85ce-b64515c24c43.png)\r\nThis is needed here because we need to know if [is_pull_request](https://github.com/OCA/maintainer-quality-tools/blob/87f2b269667c02af210493e929eb9524eb455907/travis/travis_run_tests#L57-L58) (Currently we have this code in stable branch) to verify new conventions just in PR cases to detect a diff with base branch `TRAVIS_BRANCH`.\r\n![environment variables - travis ci 2015-08-21 09-43-57](https://cloud.githubusercontent.com/assets/6644187/9411021/29e8fea4-47e9-11e5-82e1-25269c279a18.png)\r\n\r\nNow we can get git diff of `TRAVIS_BUILD_DIR`\r\n![environment variables - travis ci 2015-08-21 09-45-24](https://cloud.githubusercontent.com/assets/6644187/9411044/5d114688-47e9-11e5-8036-a53b2d53e20d.png)\r\n\r\nWith next command if is PR:\r\n```python\r\n  git --git_dir=${TRAVIS_BUILD_DIR}/.git diff-index origin/${TRAVIS_BRANCH}\r\n```\r\nNow, we have all items changed in a PR...\r\n"},"comment":{"url":"https://api.github.com/repos/OCA/maintainer-quality-tools/issues/comments/137174164","html_url":"https://github.com/OCA/maintainer-quality-tools/pull/232#issuecomment-137174164","issue_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/issues/232","id":137174164,"user":{"login":"moylop260","id":6644187,"avatar_url":"https://avatars.githubusercontent.com/u/6644187?v=3","gravatar_id":"","url":"https://api.github.com/users/moylop260","html_url":"https://github.com/moylop260","followers_url":"https://api.github.com/users/moylop260/followers","following_url":"https://api.github.com/users/moylop260/following{/other_user}","gists_url":"https://api.github.com/users/moylop260/gists{/gist_id}","starred_url":"https://api.github.com/users/moylop260/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moylop260/subscriptions","organizations_url":"https://api.github.com/users/moylop260/orgs","repos_url":"https://api.github.com/users/moylop260/repos","events_url":"https://api.github.com/users/moylop260/events{/privacy}","received_events_url":"https://api.github.com/users/moylop260/received_events","type":"User","site_admin":false},"created_at":"2015-09-02T17:09:46Z","updated_at":"2015-09-02T17:09:46Z","body":"PR of 15 days ago with 3 approvals...\r\n\r\nBut we have a discuss opened (and abandoned) by @guewen and @lepistone (without -1)\r\nWe will wait this weekend before of merge."}}