Comments (1)
At the moment we just split the file into lines and check if the line contains any of the ignore comments.
A full fix for this bug would involve parsing all the string literals, and only searching for the comments outside of the strings.
A quicker fix would be to switch from checking that the line contains the ignore comment to checking that it ends with it. We can't just check that the whole line matches (with optional white-space at the start), because it's common practice to put these lines at the end of a normal line of code.
This doesn't solve the problem for multi-line strings, where the comment could still appear on its own line, but hopefully that's an edge case on an edge case.
I'm also going to allow white-space after the comment, because otherwise there will be very tricky to debug errors:
// One of these is invalid:
// coverage:ignore-file
// coverage:ignore-file
from coverage.
Related Issues (20)
- Function coverage considers abstract methods missed
- Function coverage can't handle part files
- Function coverage should ignore implicit functions
- Support passing args to the test command
- error generating .lcov "This file is deprecated. Tools should instead consume" HOT 1
- Enhanced enums in Flutter don't get covered HOT 1
- Function inside function HOT 3
- Add a benchmark to github CI HOT 1
- Which license is used in this project? HOT 1
- Speed up --function-coverage
- Filter files using a command line flag HOT 8
- Running coverage in new flutter project HOT 1
- --test param throws error when args are added (--test="test --concurrency=1") HOT 1
- incorrect branch and line coverage with const values HOT 1
- Add `--fail-under` option
- LCOV relative paths HOT 1
- No Coverage Generated
- Fix BRDA syntax in lcov files HOT 3
- Test coverage not working for pattern destructuring of `dynamic` typed fields HOT 4
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 coverage.