{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/vscode-python/pulls/comments/168961076","pull_request_review_id":97412101,"id":168961076,"diff_hunk":"@@ -25,11 +25,14 @@ export class Pylint extends BaseLinter {\n         let minArgs: string[] = [];\n         // Only use minimal checkers if\n         //  a) there are no custom arguments and\n-        //  b) there is no pylintrc file\n+        //  b) there is no pylintrc file next to the file or at the workspace root\n         const uri = document.uri;\n         const settings = this.configService.getSettings(uri);\n         if (settings.linting.pylintUseMinimalCheckers\n             && this.info.linterArgs(uri).length === 0\n+            // Check pylintrc next to the file\n+            && !await Pylint.hasConfigurationFile(this.fileSystem, path.dirname(uri.fsPath), this.platformService)","path":"src/client/linters/pylint.ts","position":null,"original_position":11,"commit_id":"29edac2d9063d6ee04ba16f4418a5ae8b79ce6c4","original_commit_id":"29edac2d9063d6ee04ba16f4418a5ae8b79ce6c4","user":{"login":"MikhailArkhipov","id":12820357,"avatar_url":"https://avatars2.githubusercontent.com/u/12820357?v=4","gravatar_id":"","url":"https://api.github.com/users/MikhailArkhipov","html_url":"https://github.com/MikhailArkhipov","followers_url":"https://api.github.com/users/MikhailArkhipov/followers","following_url":"https://api.github.com/users/MikhailArkhipov/following{/other_user}","gists_url":"https://api.github.com/users/MikhailArkhipov/gists{/gist_id}","starred_url":"https://api.github.com/users/MikhailArkhipov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikhailArkhipov/subscriptions","organizations_url":"https://api.github.com/users/MikhailArkhipov/orgs","repos_url":"https://api.github.com/users/MikhailArkhipov/repos","events_url":"https://api.github.com/users/MikhailArkhipov/events{/privacy}","received_events_url":"https://api.github.com/users/MikhailArkhipov/received_events","type":"User","site_admin":false},"body":"According to pylint code it only searches upwards within modules and breaks search if `__init__.py` is missing.\r\n\r\nhttps://pylint.readthedocs.io/en/latest/user_guide/run.html#command-line-options\r\n\r\n1. pylintrc in the current working directory\r\n2. .pylintrc in the current working directory\r\n3. **If the current working directory is in a Python module, Pylint searches up the hierarchy of Python modules** until it finds a pylintrc file. This allows you to specify coding standards on a module-by-module basis. Of course, **a directory is judged to be a Python module if it contains an __init__.py file.**\r\n4. The file named by environment variable PYLINTRC\r\n5. if you have a home directory which isn’t /root:\r\na. .pylintrc in your home directory\r\nb. .config/pylintrc in your home directory\r\n6. /etc/pylintrc\r\n\r\nwhich is what pylint code does.\r\n\r\n```\r\ndef find_pylintrc():\r\n...\r\n        curdir = os.path.abspath(os.getcwd())\r\n        while os.path.isfile(os.path.join(curdir, '__init__.py')):\r\n            curdir = os.path.abspath(os.path.join(curdir, '..'))\r\n            if os.path.isfile(os.path.join(curdir, 'pylintrc')):\r\n                return os.path.join(curdir, 'pylintrc')\r\n            if os.path.isfile(os.path.join(curdir, '.pylintrc')):\r\n                return os.path.join(curdir, '.pylintrc')\r\n```\r\n\r\nWe do exactly this from the file location - `but linter.run` *may* change working directory to the root. Hence need to check file location and the root.\r\n\r\nHowever, I don't mind relaxing the rule and search upwards in all cases, but it won't match pylint behavior.\r\n\r\n","created_at":"2018-02-18T18:41:57Z","updated_at":"2018-02-18T18:41:57Z","html_url":"https://github.com/Microsoft/vscode-python/pull/805#discussion_r168961076","pull_request_url":"https://api.github.com/repos/Microsoft/vscode-python/pulls/805","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vscode-python/pulls/comments/168961076"},"html":{"href":"https://github.com/Microsoft/vscode-python/pull/805#discussion_r168961076"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/vscode-python/pulls/805"}},"in_reply_to_id":168899267},"pull_request":{"url":"https://api.github.com/repos/Microsoft/vscode-python/pulls/805","id":169699203,"html_url":"https://github.com/Microsoft/vscode-python/pull/805","diff_url":"https://github.com/Microsoft/vscode-python/pull/805.diff","patch_url":"https://github.com/Microsoft/vscode-python/pull/805.patch","issue_url":"https://api.github.com/repos/Microsoft/vscode-python/issues/805","number":805,"state":"open","locked":false,"title":"Fix pylintrc search","user":{"login":"MikhailArkhipov","id":12820357,"avatar_url":"https://avatars2.githubusercontent.com/u/12820357?v=4","gravatar_id":"","url":"https://api.github.com/users/MikhailArkhipov","html_url":"https://github.com/MikhailArkhipov","followers_url":"https://api.github.com/users/MikhailArkhipov/followers","following_url":"https://api.github.com/users/MikhailArkhipov/following{/other_user}","gists_url":"https://api.github.com/users/MikhailArkhipov/gists{/gist_id}","starred_url":"https://api.github.com/users/MikhailArkhipov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikhailArkhipov/subscriptions","organizations_url":"https://api.github.com/users/MikhailArkhipov/orgs","repos_url":"https://api.github.com/users/MikhailArkhipov/repos","events_url":"https://api.github.com/users/MikhailArkhipov/events{/privacy}","received_events_url":"https://api.github.com/users/MikhailArkhipov/received_events","type":"User","site_admin":false},"body":"Fixes #788 \r\n`run` changes working folder to workspace root while config search searches from the file path.\r\n\r\nFixes #786\r\nAdded handling of quote escapes","created_at":"2018-02-16T18:53:16Z","updated_at":"2018-02-18T18:41:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7a0f466ce5f9b59d931dccd43bd2aa0b672f189a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/vscode-python/pulls/805/commits","review_comments_url":"https://api.github.com/repos/Microsoft/vscode-python/pulls/805/comments","review_comment_url":"https://api.github.com/repos/Microsoft/vscode-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/vscode-python/issues/805/comments","statuses_url":"https://api.github.com/repos/Microsoft/vscode-python/statuses/29edac2d9063d6ee04ba16f4418a5ae8b79ce6c4","head":{"label":"MikhailArkhipov:master","ref":"master","sha":"29edac2d9063d6ee04ba16f4418a5ae8b79ce6c4","user":{"login":"MikhailArkhipov","id":12820357,"avatar_url":"https://avatars2.githubusercontent.com/u/12820357?v=4","gravatar_id":"","url":"https://api.github.com/users/MikhailArkhipov","html_url":"https://github.com/MikhailArkhipov","followers_url":"https://api.github.com/users/MikhailArkhipov/followers","following_url":"https://api.github.com/users/MikhailArkhipov/following{/other_user}","gists_url":"https://api.github.com/users/MikhailArkhipov/gists{/gist_id}","starred_url":"https://api.github.com/users/MikhailArkhipov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikhailArkhipov/subscriptions","organizations_url":"https://api.github.com/users/MikhailArkhipov/orgs","repos_url":"https://api.github.com/users/MikhailArkhipov/repos","events_url":"https://api.github.com/users/MikhailArkhipov/events{/privacy}","received_events_url":"https://api.github.com/users/MikhailArkhipov/received_events","type":"User","site_admin":false},"repo":{"id":121787613,"name":"vscode-python","full_name":"MikhailArkhipov/vscode-python","owner":{"login":"MikhailArkhipov","id":12820357,"avatar_url":"https://avatars2.githubusercontent.com/u/12820357?v=4","gravatar_id":"","url":"https://api.github.com/users/MikhailArkhipov","html_url":"https://github.com/MikhailArkhipov","followers_url":"https://api.github.com/users/MikhailArkhipov/followers","following_url":"https://api.github.com/users/MikhailArkhipov/following{/other_user}","gists_url":"https://api.github.com/users/MikhailArkhipov/gists{/gist_id}","starred_url":"https://api.github.com/users/MikhailArkhipov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikhailArkhipov/subscriptions","organizations_url":"https://api.github.com/users/MikhailArkhipov/orgs","repos_url":"https://api.github.com/users/MikhailArkhipov/repos","events_url":"https://api.github.com/users/MikhailArkhipov/events{/privacy}","received_events_url":"https://api.github.com/users/MikhailArkhipov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MikhailArkhipov/vscode-python","description":"Python extension for Visual Studio Code","fork":true,"url":"https://api.github.com/repos/MikhailArkhipov/vscode-python","forks_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/forks","keys_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/teams","hooks_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/hooks","issue_events_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/issues/events{/number}","events_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/events","assignees_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/assignees{/user}","branches_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/branches{/branch}","tags_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/tags","blobs_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/statuses/{sha}","languages_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/languages","stargazers_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/stargazers","contributors_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/contributors","subscribers_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/subscribers","subscription_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/subscription","commits_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/contents/{+path}","compare_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/merges","archive_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/downloads","issues_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/issues{/number}","pulls_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/pulls{/number}","milestones_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/milestones{/number}","notifications_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/labels{/name}","releases_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/releases{/id}","deployments_url":"https://api.github.com/repos/MikhailArkhipov/vscode-python/deployments","created_at":"2018-02-16T18:48:09Z","updated_at":"2018-02-16T18:48:12Z","pushed_at":"2018-02-18T03:59:06Z","git_url":"git://github.com/MikhailArkhipov/vscode-python.git","ssh_url":"git@github.com:MikhailArkhipov/vscode-python.git","clone_url":"https://github.com/MikhailArkhipov/vscode-python.git","svn_url":"https://github.com/MikhailArkhipov/vscode-python","homepage":"https://marketplace.visualstudio.com/items?itemName=ms-python.python","size":56098,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"18be595b774d6f6d79e31b608bcd682b40ddbcbc","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":106462765,"name":"vscode-python","full_name":"Microsoft/vscode-python","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/vscode-python","description":"Python extension for Visual Studio Code","fork":true,"url":"https://api.github.com/repos/Microsoft/vscode-python","forks_url":"https://api.github.com/repos/Microsoft/vscode-python/forks","keys_url":"https://api.github.com/repos/Microsoft/vscode-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vscode-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vscode-python/teams","hooks_url":"https://api.github.com/repos/Microsoft/vscode-python/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vscode-python/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vscode-python/events","assignees_url":"https://api.github.com/repos/Microsoft/vscode-python/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vscode-python/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vscode-python/tags","blobs_url":"https://api.github.com/repos/Microsoft/vscode-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vscode-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vscode-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vscode-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vscode-python/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vscode-python/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vscode-python/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vscode-python/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vscode-python/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vscode-python/subscription","commits_url":"https://api.github.com/repos/Microsoft/vscode-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vscode-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vscode-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vscode-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vscode-python/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vscode-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vscode-python/merges","archive_url":"https://api.github.com/repos/Microsoft/vscode-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vscode-python/downloads","issues_url":"https://api.github.com/repos/Microsoft/vscode-python/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vscode-python/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vscode-python/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vscode-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vscode-python/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vscode-python/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vscode-python/deployments","created_at":"2017-10-10T19:37:29Z","updated_at":"2018-02-18T15:31:03Z","pushed_at":"2018-02-17T00:16:40Z","git_url":"git://github.com/Microsoft/vscode-python.git","ssh_url":"git@github.com:Microsoft/vscode-python.git","clone_url":"https://github.com/Microsoft/vscode-python.git","svn_url":"https://github.com/Microsoft/vscode-python","homepage":"https://marketplace.visualstudio.com/items?itemName=ms-python.python","size":56047,"stargazers_count":377,"watchers_count":377,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":56,"mirror_url":null,"archived":false,"open_issues_count":257,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":56,"open_issues":257,"watchers":377,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vscode-python/pulls/805"},"html":{"href":"https://github.com/Microsoft/vscode-python/pull/805"},"issue":{"href":"https://api.github.com/repos/Microsoft/vscode-python/issues/805"},"comments":{"href":"https://api.github.com/repos/Microsoft/vscode-python/issues/805/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/vscode-python/pulls/805/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/vscode-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/vscode-python/pulls/805/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/vscode-python/statuses/29edac2d9063d6ee04ba16f4418a5ae8b79ce6c4"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"MikhailArkhipov"}}