{"action":"opened","issue":{"url":"https://api.github.com/repos/rrrene/credo/issues/514","repository_url":"https://api.github.com/repos/rrrene/credo","labels_url":"https://api.github.com/repos/rrrene/credo/issues/514/labels{/name}","comments_url":"https://api.github.com/repos/rrrene/credo/issues/514/comments","events_url":"https://api.github.com/repos/rrrene/credo/issues/514/events","html_url":"https://github.com/rrrene/credo/issues/514","id":303242467,"number":514,"title":"Proposal: Add a command to output the list of files credo will analyze","user":{"login":"wasnotrice","id":908,"avatar_url":"https://avatars2.githubusercontent.com/u/908?v=4","gravatar_id":"","url":"https://api.github.com/users/wasnotrice","html_url":"https://github.com/wasnotrice","followers_url":"https://api.github.com/users/wasnotrice/followers","following_url":"https://api.github.com/users/wasnotrice/following{/other_user}","gists_url":"https://api.github.com/users/wasnotrice/gists{/gist_id}","starred_url":"https://api.github.com/users/wasnotrice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wasnotrice/subscriptions","organizations_url":"https://api.github.com/users/wasnotrice/orgs","repos_url":"https://api.github.com/users/wasnotrice/repos","events_url":"https://api.github.com/users/wasnotrice/events{/privacy}","received_events_url":"https://api.github.com/users/wasnotrice/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-07T20:10:26Z","updated_at":"2018-03-07T20:10:26Z","closed_at":null,"author_association":"NONE","body":"### Environment\r\n\r\n* Credo version (`mix credo -v`): 0.8.10\r\n* Erlang/Elixir version (`elixir -v`):\r\n```\r\nErlang/OTP 20 [erts-9.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false]\r\n\r\nElixir 1.6.1 (compiled with OTP 19)\r\n```\r\n\r\n* Operating system: MacOS 10.13.3\r\n\r\n### What were you trying to do?\r\n\r\nI would like to check files in an editor as I make changes (VSCode in this instance, although I suspect the issue might occur in other editors too)\r\n\r\n### Expected outcome\r\n\r\nWhen I open a file that is not included in my `.credo.exs` configuration (for example, `mix.exs`), then it won't be checked.\r\n\r\n### Actual outcome\r\n\r\nAny Elixir file I open is checked.\r\n\r\nThe [credo plugin for vscode](https://github.com/iampeterbanjo/vscode-elixir-linter) works by sending the current file contents to credo via stdin. Credo has an option to facilitate this, which is great! But there doesn't seem to be a way to ask Credo, \"Are you supposed to check this file?\" I would like to ask Credo for a list of files that it would check if it were run right now, similar to the output of `find` :\r\n\r\n```\r\n$ mix credo files\r\n/full/path/to/lib/supervisor.ex\r\n/full/path/to/lib/rules.ex\r\n/full/path/to/test/supervisor_test.exs\r\n```\r\n\r\nThen, if the current file isn't in Credo's list, I wouldn't check it, so my editor would not display Credo warnings. I don't believe this would add any core functionality to Credo. It would just output the list of files that Credo already generates.\r\n\r\nIs this a feature you would consider including? If so, I'd be happy to work it up."}}
{"actor":{"display_login":"wasnotrice"}}