Git Product home page Git Product logo

Comments (4)

sjjf avatar sjjf commented on May 27, 2024

I'm happy to make a pull request with that change, but for an 8 character change that seems a bit over the top . . .

from tokei.

XAMPPRocky avatar XAMPPRocky commented on May 27, 2024

Thank you for your issue! Seems like an appropriate step to take for now. Can I ask what language are you using in your project that uses the conf extension?

All PRs large and small are welcome and appreciated :)

from tokei.

sjjf avatar sjjf commented on May 27, 2024

This is a puppet environment - it's got a whole bunch of files of various types, including templates for config files in at least ten different formats, and plain config files in another ten different formats.

I don't know if a generic "config file" language config would be viable, there are probably some reasonable assumptions you could make ('#' or ';' for line comments would probably work for the majority of what you might call generic *.conf files), but they'd be necessarily broad . . . But it's pretty obvious to me that no specific language should lay claim to the .conf extension - that way lies madness.

PR submitted, #1001 - I didn't see anything in the contributors doco about sign off or anything like that, if I missed something let me know and I'll fix it.

from tokei.

sjjf avatar sjjf commented on May 27, 2024

Yeah, five minutes looking through /etc on my local Linux machine showed 95%+ using the '#' line comment format, as you'd expect . . . aside from a bunch of XML files masquerading as "*.conf" files (gconf and fontconfig being the culprits there).

I /think/ that would be something like:

diff --git a/languages.json b/languages.json
index 9627450..0614431 100644
--- a/languages.json
+++ b/languages.json
@@ -247,6 +247,11 @@
       "multi_line_comments": [["(*", "*)"]],
       "extensions": ["v"]
     },
+    "Config": {
+        "name": "Generic config file",
+        "line_comment": ["#"],
+        "extensions": ["conf"]
+    },
     "Cpp": {
       "name": "C++",
       "line_comment": ["//"],

Though that might be claiming more than it should, if the only option for deciding what language rule to match is the extension then that's probably the best it could do.

I just submitted a PR with that, #1002.

from tokei.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.