Closed CramBL closed 7 months ago
Ok NVM I figured it out. Sorry for the noise.
I should encode the +
in C++
as %2b
and the spaces in C++ Header
as %20
and then it works.
e.g.
![](https://tokei.rs/b1/github/stephenberry/glaze?type=Cpp,CppHeader)
Should be
![](https://tokei.rs/b1/github/stephenberry/glaze?type=C%2b%2b,C%2b%2b%20Header)
Hi, counting C++ lines of code seems to be broken (for generating badges).
I use the popular fmtlib as the first example, which used
.h
for C++ header files (not supported in your languages.json) and uses.cc
for C++ source files which IS supported in languages.json.Second example is identical but uses glaze as the repo, which uses
.hpp
and.cpp
for header and source files.1. Example fmtlib (.h/.cc)
At first it appears to work:![](https://tokei.rs/b1/github/fmtlib/fmt?type=Cpp,CppHeader)
![](https://tokei.rs/b1/github/fmtlib/fmt?type=Cpp,CppHeader)
But it doesn't, it appears that
Cpp
andCppHeader
is not recognized so instead it falls back on detecting any languages.When adding
Now it's only 1.2k lines which is how many lines of Cmake there are in the repo.
Cmake
to the list:![](https://tokei.rs/b1/github/fmtlib/fmt?type=Cpp,CppHeader,Cmake)
Adding![](https://tokei.rs/b1/github/fmtlib/fmt?type=Cpp,CppHeader,Go)
Go
instead ofCmake
puts the LoC at 0 asGo
is recognized but there's noGo
code in fmtlib.![](https://tokei.rs/b1/github/fmtlib/fmt?type=Cpp,CppHeader,Go)
2. Example glaze (.hpp/.cpp)
Just![](https://tokei.rs/b1/github/stephenberry/glaze?type=Cpp,CppHeader)
?type=Cpp,CppHeader
![](https://tokei.rs/b1/github/stephenberry/glaze?type=Cpp,CppHeader)
When adding![](https://tokei.rs/b1/github/stephenberry/glaze?type=Cpp,CppHeader,Cmake)
Cmake
to the list:![](https://tokei.rs/b1/github/stephenberry/glaze?type=Cpp,CppHeader,Cmake)
Adding![](https://tokei.rs/b1/github/stephenberry/glaze?type=Cpp,CppHeader,Go)
Go
instead ofCmake
![](https://tokei.rs/b1/github/stephenberry/glaze?type=Cpp,CppHeader,Go)