{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/2655","labels_url":"https://api.github.com/repos/eslint/eslint/issues/2655/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/2655/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/2655/events","html_url":"https://github.com/eslint/eslint/pull/2655","id":83184235,"number":2655,"title":"Run processors when calling executeOnText (fixes #2331)","user":{"login":"tikotzky","id":200528,"avatar_url":"https://avatars.githubusercontent.com/u/200528?v=3","gravatar_id":"","url":"https://api.github.com/users/tikotzky","html_url":"https://github.com/tikotzky","followers_url":"https://api.github.com/users/tikotzky/followers","following_url":"https://api.github.com/users/tikotzky/following{/other_user}","gists_url":"https://api.github.com/users/tikotzky/gists{/gist_id}","starred_url":"https://api.github.com/users/tikotzky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tikotzky/subscriptions","organizations_url":"https://api.github.com/users/tikotzky/orgs","repos_url":"https://api.github.com/users/tikotzky/repos","events_url":"https://api.github.com/users/tikotzky/events{/privacy}","received_events_url":"https://api.github.com/users/tikotzky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-31T20:50:55Z","updated_at":"2015-05-31T22:19:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/eslint/eslint/pulls/2655","html_url":"https://github.com/eslint/eslint/pull/2655","diff_url":"https://github.com/eslint/eslint/pull/2655.diff","patch_url":"https://github.com/eslint/eslint/pull/2655.patch"},"body":"Right now processors are only ran when calling `executeOnFiles` this PR changes it so that processors will be run on both `executeOnText` and `executeOnFiles`.\r\n\r\nSince with this update both `executeOnText` and `executeOnFiles` are now pretty much doing the same thing, I changed `executeOnFiles` to just read the file and then call `executeOnText` with the file contents.\r\n\r\nOne thing to note: There was one existing test that I updated, but it seems like the test was broken before.\r\nThe test I am referring to is https://github.com/tikotzky/eslint/blob/ab30f022a2d0627d001f1bd7f2df83fa0a78a517/tests/lib/cli-engine.js#L306-L322.\r\n\r\n```\r\n// before\r\nassert.equal(report.results[0].messages[1].ruleId, \"no-undef\");\r\n// after\r\nassert.equal(report.results[0].messages[0].ruleId, \"no-undef\");\r\n```\r\nThe reason why it was looking at `messages[1]` was because `messages[0]` was [`strict`](http://eslint.org/docs/rules/strict). \r\nThat test sets `reset:true` in its config and then only enables `no-undef` like...\r\n```\r\nreset: true,\r\nrules: {\r\n  \"no-undef\": 2\r\n}\r\n```\r\nso i'm not sure how `strict` was ever getting in there in the first place.\r\nWhen I made these changes to support processors when calling `executeOnText` it fixed that issue so I updated that test.\r\nPlease let me know if you'd like it done differently."},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/107253599","html_url":"https://github.com/eslint/eslint/pull/2655#issuecomment-107253599","issue_url":"https://api.github.com/repos/eslint/eslint/issues/2655","id":107253599,"user":{"login":"gyandeeps","id":5554486,"avatar_url":"https://avatars.githubusercontent.com/u/5554486?v=3","gravatar_id":"","url":"https://api.github.com/users/gyandeeps","html_url":"https://github.com/gyandeeps","followers_url":"https://api.github.com/users/gyandeeps/followers","following_url":"https://api.github.com/users/gyandeeps/following{/other_user}","gists_url":"https://api.github.com/users/gyandeeps/gists{/gist_id}","starred_url":"https://api.github.com/users/gyandeeps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gyandeeps/subscriptions","organizations_url":"https://api.github.com/users/gyandeeps/orgs","repos_url":"https://api.github.com/users/gyandeeps/repos","events_url":"https://api.github.com/users/gyandeeps/events{/privacy}","received_events_url":"https://api.github.com/users/gyandeeps/received_events","type":"User","site_admin":false},"created_at":"2015-05-31T22:19:47Z","updated_at":"2015-05-31T22:19:47Z","body":"Can you please rebase with master. "}}