Linguist: Rails mime_type.rb considered as "E"?

Created on 16 Sep 2016  路  8Comments  路  Source: github/linguist

Hey!

Why is this file considered as "E"?

See the screenshots how I got this:

On the rails repo:
screen shot 2016-09-16 at 12 13 54

And by clicking the "E":
screen shot 2016-09-16 at 12 14 03

Most helpful comment

Don't worry, I'm revising the modeline regex as we speak. :)

All 8 comments

That would be because of this line, here:

# -*- frozen-string-literal: true -*-

The current Emacs modeline is a little buggy and needs fixing... I'm currently working on that, actually.

You can fix this issue by moving the modeline to the bottom of the file, as Linguist only scans the first five lines to look for a modeline.

Okay, but when I replace it with # frozen_string_literal: true it should work right?

Yes. It's the -*- parts that're telling Linguist it's an Emacs modeline.

This seems like a bug indeed.

Don't worry, I'm revising the modeline regex as we speak. :)

@arthurnn Done. #3227 will fix this as well as a similar issue reported previously.

@pchaigno, this can be closed, because everything's fixed. =)

Note the refreshing absence of "E" in the language breakdown.

Thanks @siegy22 for reporting the issue! Thanks @Alhadis for fixing it :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

henrywright picture henrywright  路  6Comments

Sanchez3 picture Sanchez3  路  4Comments

Haroenv picture Haroenv  路  4Comments

philiparvidsson picture philiparvidsson  路  4Comments

oliviertassinari picture oliviertassinari  路  5Comments