Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Spacetown
Copy link
Member

Add a option to scan the search paths for files which ar added to the report with zero coverage by default to see files which are without coverage/test for now.

Closes #986

@codacy-production
Copy link

codacy-production bot commented Oct 14, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.06% (target: -1.00%) 98.59% (target: 60.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (76e0830) 4499 4352 96.73%
Head commit (6712855) 4494 (-5) 4350 (-2) 96.80% (+0.06%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#998) 71 70 98.59%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@Spacetown Spacetown force-pushed the add_empty_file_coverage branch 2 times, most recently from 50aad9c to 6ae37a1 Compare October 14, 2024 20:47
Scan the search paths for files matching a pattern and add a empty file
coverage object for the file.
@Spacetown Spacetown force-pushed the add_empty_file_coverage branch from 6ae37a1 to 54d026e Compare October 14, 2024 21:03
@Spacetown Spacetown force-pushed the add_empty_file_coverage branch from 54d026e to 9d67d19 Compare October 15, 2024 05:56
@dlegaultbbry
Copy link
Contributor

Tested and it works fine.

Should the files report their total lines so that the total % would be lower than what it is for just tested files?

@Spacetown
Copy link
Member Author

Should the files report their total lines so that the total % would be lower than what it is for just tested files?

I had this in the beginning but we don't know which lines contain code. If you wish this you can compile the files with coverage and we use then the gcno file if no gcda file is found.

@Spacetown Spacetown marked this pull request as ready for review October 15, 2024 15:57
@dlegaultbbry
Copy link
Contributor

I agree it's not a blocker. At least we can see the signal that a file is not covered which is sufficient in my use case. Thanks.

Spacetown and others added 2 commits October 15, 2024 19:25
- Rename function and change return value.
- Move logging of include/exclude into function.
- Add debug messages.
@Spacetown Spacetown force-pushed the add_empty_file_coverage branch from ec89516 to a187fde Compare October 15, 2024 19:17
@Spacetown Spacetown force-pushed the add_empty_file_coverage branch from 67a1706 to ea6fbe8 Compare October 16, 2024 13:10
@Spacetown Spacetown merged commit dacdfc9 into gcovr:main Oct 17, 2024
34 checks passed
@Spacetown Spacetown deleted the add_empty_file_coverage branch October 17, 2024 21:05
dlegaultbbry pushed a commit to dlegaultbbry/gcovr that referenced this pull request Oct 22, 2024
- Add option to add empty coverage for source files by scanning the search
  paths for files matching a pattern and add a empty file coverage object for the file.
- Refactor file filtering
  - Rename function and change return value.
  - Move logging of include/exclude into function.
  - Add debug messages.
D-Walther pushed a commit to D-Walther/gcovr that referenced this pull request Jun 16, 2025
- Add option to add empty coverage for source files by scanning the search
  paths for files matching a pattern and add a empty file coverage object for the file.
- Refactor file filtering
  - Rename function and change return value.
  - Move logging of include/exclude into function.
  - Add debug messages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generating json for files which have no coverage

2 participants