Skip to content
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

Empty lines not executable v2 #807

Conversation

dvdoug
Copy link
Contributor

@dvdoug dvdoug commented Sep 5, 2020

#799, version 2

This version moves the skip logic from the very end of the process to the very beginning 🤞 that should cover all potential scenarios. This has been tested on #799 (no line 14) and sebastian/code-unit (no risky tests).

This is using a static array cache rather than the static analysis file cache because the file cache is predicated around filenames and methods, but the problem in #799 is lines that are completely outside of a method so those cache keys don't fit the usecase. The analysis itself is also fairly cheap so there's less benefit from persisting that across runs than the more advanced PHP-Parser based analyses so I think that should be OK.

@codecov
Copy link

codecov bot commented Sep 5, 2020

Codecov Report

Merging #807 into master will increase coverage by 0.02%.
The diff coverage is 68.75%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #807      +/-   ##
============================================
+ Coverage     83.29%   83.31%   +0.02%     
- Complexity     1124     1129       +5     
============================================
  Files            60       60              
  Lines          3471     3482      +11     
============================================
+ Hits           2891     2901      +10     
- Misses          580      581       +1     
Impacted Files Coverage Δ Complexity Δ
src/CodeCoverage.php 44.68% <44.44%> (-1.12%) 96.00 <3.00> (-3.00)
src/RawCodeCoverageData.php 96.20% <100.00%> (+0.81%) 38.00 <8.00> (+8.00)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 889f1cc...745be79. Read the comment docs.

@sebastianbergmann sebastianbergmann merged commit 11bd4c1 into sebastianbergmann:master Sep 6, 2020
@sebastianbergmann
Copy link
Owner

Thanks!

@dvdoug dvdoug deleted the empty_lines_not_executable_v2 branch September 18, 2020 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants