{"action":"created","issue":{"url":"https://api.github.com/repos/flosse/sloc/issues/59","repository_url":"https://api.github.com/repos/flosse/sloc","labels_url":"https://api.github.com/repos/flosse/sloc/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/flosse/sloc/issues/59/comments","events_url":"https://api.github.com/repos/flosse/sloc/issues/59/events","html_url":"https://github.com/flosse/sloc/issues/59","id":119914342,"number":59,"title":"limiting to a single file type.","user":{"login":"ceelian","id":116299,"avatar_url":"https://avatars.githubusercontent.com/u/116299?v=3","gravatar_id":"","url":"https://api.github.com/users/ceelian","html_url":"https://github.com/ceelian","followers_url":"https://api.github.com/users/ceelian/followers","following_url":"https://api.github.com/users/ceelian/following{/other_user}","gists_url":"https://api.github.com/users/ceelian/gists{/gist_id}","starred_url":"https://api.github.com/users/ceelian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceelian/subscriptions","organizations_url":"https://api.github.com/users/ceelian/orgs","repos_url":"https://api.github.com/users/ceelian/repos","events_url":"https://api.github.com/users/ceelian/events{/privacy}","received_events_url":"https://api.github.com/users/ceelian/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/flosse/sloc/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-02T10:40:09Z","updated_at":"2016-02-05T00:58:45Z","closed_at":null,"body":"Is there any working solution to limit analysis to a single file extension? I tried using the -e (--exclude) switch to limit e.g. to JavaScript files. The idea is to exclude all files which are not javascript files.\r\n\r\n```\r\nsloc  -e \".+^(\\.js)$\" -d .\r\n```\r\n\r\nBut it is not working."},"comment":{"url":"https://api.github.com/repos/flosse/sloc/issues/comments/180131439","html_url":"https://github.com/flosse/sloc/issues/59#issuecomment-180131439","issue_url":"https://api.github.com/repos/flosse/sloc/issues/59","id":180131439,"user":{"login":"bwin","id":1673361,"avatar_url":"https://avatars.githubusercontent.com/u/1673361?v=3","gravatar_id":"","url":"https://api.github.com/users/bwin","html_url":"https://github.com/bwin","followers_url":"https://api.github.com/users/bwin/followers","following_url":"https://api.github.com/users/bwin/following{/other_user}","gists_url":"https://api.github.com/users/bwin/gists{/gist_id}","starred_url":"https://api.github.com/users/bwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwin/subscriptions","organizations_url":"https://api.github.com/users/bwin/orgs","repos_url":"https://api.github.com/users/bwin/repos","events_url":"https://api.github.com/users/bwin/events{/privacy}","received_events_url":"https://api.github.com/users/bwin/received_events","type":"User","site_admin":false},"created_at":"2016-02-05T00:58:45Z","updated_at":"2016-02-05T00:58:45Z","body":"```\r\nglob = require 'glob'\r\n\r\npattern = \"**\"\r\noptions =\r\n\tignore: [\"**/*.json\", \"node_modules/**\"]\r\n\tnodir: yes # only files\r\nglob pattern, options, (err, matches) -> console.log matches\r\n```\r\n\r\nThis returns all filenames that match `pattern`, filtered by `ignore`. Supports only one pattern, but multiple ignore-patterns."}}