Comments (4)
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.
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.
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.
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)
- Raku files not shown in statistics
- My tokei does not detect the config file HOT 1
- `.reds` extension overlap in Red / Redscript languages. HOT 2
- Evaluate Profile-Guided Optimization (PGO) and Post-Link Optimization (PLO)
- how to handle special files HOT 3
- Badge: C++/C++ Header lines not working HOT 2
- Add support for slint files HOT 1
- Solidity: Incorrect code count from misreading valid comments HOT 1
- How are the filenames listed by the '--files' option ordered?
- Increase small height to tokei widget
- Can you support ignoring reports?
- Use as library
- windows output broken by #896
- Ignore files extensions by regex
- Add the ability to exclude test code/custom blocks
- All repositories have 0 lines of code HOT 3
- Jupyter notebook (`.ipynb`) is blowing the number of lines out of proportion HOT 2
- Incorrect code line count caused by ChildLanguage HOT 3
- installation of v13.0.0-alpha.1 HOT 7
- Add support for per-project custom DSL sloc HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tokei.