{"action":"created","issue":{"url":"https://api.github.com/repos/github/linguist/issues/3600","repository_url":"https://api.github.com/repos/github/linguist","labels_url":"https://api.github.com/repos/github/linguist/issues/3600/labels{/name}","comments_url":"https://api.github.com/repos/github/linguist/issues/3600/comments","events_url":"https://api.github.com/repos/github/linguist/issues/3600/events","html_url":"https://github.com/github/linguist/issues/3600","id":226443465,"number":3600,"title":"Short Rust files misclassified as RenderScript","user":{"login":"newpavlov","id":329626,"avatar_url":"https://avatars3.githubusercontent.com/u/329626?v=3","gravatar_id":"","url":"https://api.github.com/users/newpavlov","html_url":"https://github.com/newpavlov","followers_url":"https://api.github.com/users/newpavlov/followers","following_url":"https://api.github.com/users/newpavlov/following{/other_user}","gists_url":"https://api.github.com/users/newpavlov/gists{/gist_id}","starred_url":"https://api.github.com/users/newpavlov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newpavlov/subscriptions","organizations_url":"https://api.github.com/users/newpavlov/orgs","repos_url":"https://api.github.com/users/newpavlov/repos","events_url":"https://api.github.com/users/newpavlov/events{/privacy}","received_events_url":"https://api.github.com/users/newpavlov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-05T00:21:02Z","updated_at":"2017-05-05T09:39:31Z","closed_at":null,"body":"[Files in question.](https://github.com/RustCrypto/hashes/search?l=renderscript)"},"comment":{"url":"https://api.github.com/repos/github/linguist/issues/comments/299423271","html_url":"https://github.com/github/linguist/issues/3600#issuecomment-299423271","issue_url":"https://api.github.com/repos/github/linguist/issues/3600","id":299423271,"user":{"login":"lildude","id":627280,"avatar_url":"https://avatars0.githubusercontent.com/u/627280?v=3","gravatar_id":"","url":"https://api.github.com/users/lildude","html_url":"https://github.com/lildude","followers_url":"https://api.github.com/users/lildude/followers","following_url":"https://api.github.com/users/lildude/following{/other_user}","gists_url":"https://api.github.com/users/lildude/gists{/gist_id}","starred_url":"https://api.github.com/users/lildude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lildude/subscriptions","organizations_url":"https://api.github.com/users/lildude/orgs","repos_url":"https://api.github.com/users/lildude/repos","events_url":"https://api.github.com/users/lildude/events{/privacy}","received_events_url":"https://api.github.com/users/lildude/received_events","type":"User","site_admin":true},"created_at":"2017-05-05T09:39:31Z","updated_at":"2017-05-05T09:39:31Z","body":"Looks like the files are too small and don't have any of the characteristics we use to differentiate Rust from RenderScript at https://github.com/github/linguist/blob/master/lib/linguist/heuristics.rb#L407-L413 so is falling through to the classifier which in turn is only just classifying the files as RenderScript:\r\n\r\n```\r\n$ LINGUIST_DEBUG=1 ~/github/linguist/bin/linguist ./hashes/gost94/src/cryptopro.rs\r\ncryptopro.rs: 13 lines (11 sloc)\r\n  type:      Text\r\n  mime type: application/rls-services+xml\r\nRenderScript =   -158.368 +  -6.808 =   -165.177\r\n      Rust =   -162.173 +  -6.403 =   -168.576\r\n  language:  RenderScript\r\n$ LINGUIST_DEBUG=1 ~/github/linguist/bin/linguist ./hashes/gost94/src/s2015.rs\r\ns2015.rs: 13 lines (11 sloc)\r\n  type:      Text\r\n  mime type: application/rls-services+xml\r\nRenderScript =   -158.368 +  -6.808 =   -165.177\r\n      Rust =   -162.173 +  -6.403 =   -168.576\r\n  language:  RenderScript\r\n$ LINGUIST_DEBUG=1 ~/github/linguist/bin/linguist ./hashes/gost94/src/test_param.rs\r\ntest_param.rs: 13 lines (11 sloc)\r\n  type:      Text\r\n  mime type: application/rls-services+xml\r\nRenderScript =   -158.368 +  -6.808 =   -165.177\r\n      Rust =   -162.173 +  -6.403 =   -168.576\r\n  language:  RenderScript\r\n$\r\n```\r\n\r\nThe decision to compare Rust to RenderScript is initially being made off the file extension.\r\n\r\nYou can help improve the classification by submitting some more real-world Rust examples.\r\n\r\nUntil then, a [manual override](https://github.com/github/linguist#overrides) is the only option to get these picked up as Rust."}}
{"actor":{"display_login":"lildude"}}