Comments (2)
As we are using the current line call, if we modify the file for any purpose, the line could change so, when we run a new
tombstone-analyzer
routine we will have onedeleted
tombstone call and a new onedead
call.
That's actually not true. The hash
value is only used to deduplicate repeating calls from the same tombstone. That doesn't change anything about weather a tombstone is dead, undead or deleted.
Matching logged tombstone calls to tombstones in the codebase is based on two strategies:
- Location of the tombstone (file + line + inscription)
- Context of the tombstone (surrounding method/function + inscription)
If one of those matches, the logged call is assigned to the tombstone. So you can move a tombstone around, as long as one of those criteria stays the same the analyzer would still be able to match it.
Though, if you heavily refactor your codebase (change method names and change code to shift tombstones around), then it can in fact happen, that previously logged tombstone calls are no longer be matched to that tombstone in the code. In that case, the previously logged tombstone calls would show up as deleted
and you'd get new tombstones showing up in the report. Once that code is executed and new tombstone calls are being sampled, you should quickly get a refreshed clear picture, which ones are dead and which ones aren't. But for that you have to give the system some time to collect new samples after a heavy refactoring.
If this way of matching is not good or stable enough for you, the idea for custom matching strategies is here, but it hasn't gained much interest yet.
from tombstone.
Those two matches look like a good strategy. The only number that could be not exact is the deleted
but just in extreme cases. Also, I'm considering that the analyzer needs to be run periodically to have a good summary of the evolution of dead code results and to maintain effective statistics of the code.
Thanks for the clarification.
from tombstone.
Related Issues (15)
- Having a gravedigger ? HOT 1
- Custom matching strategies
- Automation to Place Tombstones and Clean-Up Dead Code HOT 2
- Report Generation for krakjoe/tombs
- Support class methods as tombstone functions HOT 5
- Remove sebastian/finder-facade dependency HOT 2
- HTML report with wrong bootstrap version HOT 3
- HTML report missing figures on "Source" and "Dashboard" pages HOT 1
- StackTraceFrame->getLine returns the last line on multi-line method calls HOT 2
- Configurable tombstone function name HOT 1
- Custom log providers HOT 3
- Custom tombstone extractors
- Checkstyle report
- Compatibility with PHPUnit 9 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 tombstone.