{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/5166","repository_url":"https://api.github.com/repos/eslint/eslint","labels_url":"https://api.github.com/repos/eslint/eslint/issues/5166/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/5166/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/5166/events","html_url":"https://github.com/eslint/eslint/issues/5166","id":131804477,"number":5166,"title":"`no-unmodified-loop-condition` false positive","user":{"login":"feross","id":121766,"avatar_url":"https://avatars.githubusercontent.com/u/121766?v=3","gravatar_id":"","url":"https://api.github.com/users/feross","html_url":"https://github.com/feross","followers_url":"https://api.github.com/users/feross/followers","following_url":"https://api.github.com/users/feross/following{/other_user}","gists_url":"https://api.github.com/users/feross/gists{/gist_id}","starred_url":"https://api.github.com/users/feross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feross/subscriptions","organizations_url":"https://api.github.com/users/feross/orgs","repos_url":"https://api.github.com/users/feross/repos","events_url":"https://api.github.com/users/feross/events{/privacy}","received_events_url":"https://api.github.com/users/feross/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eslint/eslint/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/eslint/eslint/labels/proposal","name":"proposal","color":"fef2c0"},{"url":"https://api.github.com/repos/eslint/eslint/labels/rule","name":"rule","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-06T01:35:10Z","updated_at":"2016-02-06T02:07:44Z","closed_at":null,"body":"Using eslint 2.0.0-rc.0.\r\n\r\nCode:\r\n\r\n```js\r\nvar i = 0\r\nvar j = 10\r\nwhile (++i < j) {\r\n  console.log(i)\r\n}\r\n```\r\n\r\nRules:\r\n\r\n```json\r\n{\r\n  \"rules\": {\r\n    \"no-unmodified-loop-condition\": 2\r\n  }\r\n}\r\n```\r\n\r\nI get this unexpected error:\r\n\r\n```\r\n3:14  error  'j' is not modified in this loop  no-unmodified-loop-condition\r\n```\r\n\r\nThe examples in the docs indicate that this rule is smart enough to handle cases where \"the result of a binary expression is changed in the loop\". Seems there's a bug.\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/30594986-no-unmodified-loop-condition-false-positive?utm_campaign=plugin&utm_content=tracker%2F282608&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F282608&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/180658527","html_url":"https://github.com/eslint/eslint/issues/5166#issuecomment-180658527","issue_url":"https://api.github.com/repos/eslint/eslint/issues/5166","id":180658527,"user":{"login":"feross","id":121766,"avatar_url":"https://avatars.githubusercontent.com/u/121766?v=3","gravatar_id":"","url":"https://api.github.com/users/feross","html_url":"https://github.com/feross","followers_url":"https://api.github.com/users/feross/followers","following_url":"https://api.github.com/users/feross/following{/other_user}","gists_url":"https://api.github.com/users/feross/gists{/gist_id}","starred_url":"https://api.github.com/users/feross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feross/subscriptions","organizations_url":"https://api.github.com/users/feross/orgs","repos_url":"https://api.github.com/users/feross/repos","events_url":"https://api.github.com/users/feross/events{/privacy}","received_events_url":"https://api.github.com/users/feross/received_events","type":"User","site_admin":false},"created_at":"2016-02-06T02:07:44Z","updated_at":"2016-02-06T02:07:44Z","body":"Right. But it seems like the *intent* of the rule, based on the docs and even the rule name, was to detect unchanged *conditions*. Not to check that every variable in the condition is modified."}}