{"action":"closed","issue":{"url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1707","labels_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1707/labels{/name}","comments_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1707/comments","events_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1707/events","html_url":"https://github.com/jscs-dev/node-jscs/issues/1707","id":102115334,"number":1707,"title":"jscs looking in .git folder","user":{"login":"bstream","id":3505504,"avatar_url":"https://avatars.githubusercontent.com/u/3505504?v=3","gravatar_id":"","url":"https://api.github.com/users/bstream","html_url":"https://github.com/bstream","followers_url":"https://api.github.com/users/bstream/followers","following_url":"https://api.github.com/users/bstream/following{/other_user}","gists_url":"https://api.github.com/users/bstream/gists{/gist_id}","starred_url":"https://api.github.com/users/bstream/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bstream/subscriptions","organizations_url":"https://api.github.com/users/bstream/orgs","repos_url":"https://api.github.com/users/bstream/repos","events_url":"https://api.github.com/users/bstream/events{/privacy}","received_events_url":"https://api.github.com/users/bstream/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jscs-dev/node-jscs/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-08-20T11:03:53Z","updated_at":"2015-09-28T14:04:21Z","closed_at":"2015-09-28T14:04:21Z","body":"Found a weird issue when running jscs on my code. It appears that `jscs .` will look in dot-directories by default (for example `.git`). The error was triggered because my branch name ends in .js and jscs therefore tried to parse `/.git/logs/refs/heads/branch.js`.\r\n\r\n```\r\n> jscs .\r\n\r\nparseError: undefined at ./.git/logs/refs/heads/branch.js :\r\n     1 |0000000000000000000000000000000000000000 897bfdbcabdfa7ce535205c6b2c751bb0d84e69e Andreas Broström <andreas.brostrom@nordnet.se> 1440067510 +0200 branch: Created from HEAD\r\n----------------------------------------------------^\r\n     2 |\r\n\r\nparseError: undefined at ./.git/refs/heads/branch.js :\r\n     1 |897bfdbcabdfa7ce535205c6b2c751bb0d84e69e\r\n-----------^\r\n     2 |\r\n\r\n\r\n2 code style errors found.\r\n```\r\n\r\nThe example can be found at: https://github.com/bstream/jscs-js-branchname/tree/branch.js\r\n\r\nThis error can be fixed by supplying \".git\" to the \"excludeFiles\"-list in `.jscsrc`, or by supplying the specific folders and files to be tested as arguments to jscs. However, maybe jscs should ignore hidden files by default? (Which is the case with for example ESLint, see https://github.com/eslint/eslint/issues/1077)\r\n\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/25984132-jscs-looking-in-git-folder?utm_campaign=plugin&utm_content=tracker%2F281640&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F281640&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"}}