question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

could we make --all ignore comments

See original GitHub issue

Because our --all functionality does not take into account multi-line comments, we end up with a fairly large discrepancy between nyc and c8’s --all, see:

https://github.com/googleapis/nodejs-asset/pull/236

I wonder if we could be clever and detect multiline comments, and drop these from our estimation of --all.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
gboercommented, May 31, 2022

Just adding my 2 cents here, this also relates to files that only have Typescript interfaces. When executing the code with ts-node, the interfaces disappear, since they are not native to Javascript and then end up being uncovered in the final report (with --all enabled). However, it is also impossible ignore them using c8-ignore statements, since (I assume), are not read at all. So the only way I can exclude them is by disabling --all.

0reactions
j03mcommented, Jan 22, 2020

Will take a look at this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to make git ignore comments in file? - Stack Overflow
It would be little troublesome for git to identify comments. You can definitely ignore space -w arguments to git. Example:- git diff -w...
Read more >
How disable comments make static analysis tools worse
I will argue in this article that disable comments and warnings are harmful to static analysis tools and our codebases, and ultimately argue ......
Read more >
Remove or ignore all comment lines from Linux config files
In this tutorial, we show several methods you can use to remove all comment lines from a file via the Linux command line....
Read more >
Python Type Hints - How to Manage “type: ignore” Comments ...
I 've found Mypy has a few options to make such ignore comments more precise and manageable. These options are:.
Read more >
"Find and Replace" add options to EXCLUDE lines "With a ...
"Find and Replace" is a tool very used every day from all developers, but have a *great lack*:. EXCLUDING from results all commented...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found