Repo created to reproduce bug github-linguist/linguist#2377
The ui.jsm is taken from here
-
Installed linguist (ubuntu 14.04).
$ sudo gem install github-linguist ... Successfully installed github-linguist-4.5.4 ...
-
Cd to repo folder and run next commands in irb1.9.1:
require 'rugged' require 'linguist' repo = Rugged::Repository.new('.') project = Linguist::Repository.new(repo, repo.head.target_id) project.language #=> "Java"
The output from last command should be "Javascript".
-
After adding .gitattributes with content:
*.jsm linguist-language=Javascript
project.language
returns 'Javascript' (did not commit that in repo).
Wrong modeline was set for this file. So it is better to change Mode: Java
on Mode: Javascript
(github-linguist/linguist#2377 (comment)).