could we make --all ignore comments
See original GitHub issueBecause 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:
- Created 4 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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
.Will take a look at this.