-
-
Notifications
You must be signed in to change notification settings - Fork 539
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
Incorrect code line count caused by ChildLanguage #1073
Comments
Thank you for your issue! However tokei is correct here. All doc comments in Rust are markdown and this code is invalid Rust because it needs to be attached to an item. |
Thank you for the clarification! For the following code snippet, is the result from tokei also correct? const demo: &str = "Hello, World!";
/// markdown? docstring?
const demo1: &str = "Hello, World!"; Output:
IMHO, LoC should be 2 here? A correct example is: const demo: u8 = 42;
/// markdown? docstring?
const demo1: &str = "Hello, World!"; Output:
|
A similar issue is #713 , my guess is that the early return at https://github.com/XAMPPRocky/tokei/blob/master/src/language/syntax.rs#L250-L252 somehow affected the counting of previous lines when there is a quote. |
I also have seen the comment code count be kind of strange. On a project I have, I get this output when running
It seems like it is not counting the markdown inside Rust as comments, but I feel like it should? |
Output:
Trace:
Expected output:
The text was updated successfully, but these errors were encountered: