Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to override extensions? #116

Closed
kaushalmodi opened this issue Apr 13, 2017 · 2 comments
Closed

Option to override extensions? #116

kaushalmodi opened this issue Apr 13, 2017 · 2 comments

Comments

@kaushalmodi
Copy link
Contributor

Hello,

I am not a Rust programmer but I was following the CONTRIBUTING/md to add support for Verilog and SystemVerilog.

So I added these to the languages.json (in alphabetical order):

        "SystemVerilog":{
            "base":"c",
            "extensions":[
                "sv",
                "svh"
            ]
        },
        "Verilog":{
            "base":"c",
            "extensions":[
                "v",
                "vg"
            ]
        },

But then on building, I get:

   Compiling tokei v6.0.0 (file:///home/kmodi/downloads/git/tokei)
error[E0001]: unreachable pattern
   --> /home/kmodi/downloads/git/tokei/target/x86_64-unknown-linux-musl/release/build/tokei-cfa6d5ef49951a7c/out/language_type.rs:875:25
    |
875 |                         "v" |
    |                         ^^^ this is an unreachable pattern

error: aborting due to previous error

error: Could not compile `tokei`.

I believe it's because the .v extension is already taken by Coq:

        "Coq":{
            "base":"func",
            "extensions":[
                "v"
            ]
        },

I have never coded in Coq.. So would there be a way to add a smarter detection of languages.. based on some language keywords may be? Or simply config options?

@kaushalmodi
Copy link
Contributor Author

Another such conflict with

        "ObjectiveC":{
            "name":"Objective C",
            "base":"c",
            "extensions":[
                "m"
            ]
        },

All my .m files are Matlab scripts.. makes more sense.. m for Matlab :)

@XAMPPRocky
Copy link
Owner

Closing this a duplicate of #67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants