Coder Social home page Coder Social logo

borisguery / tombstone Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scheb/tombstone

0.0 1.0 0.0 1.24 MB

Dead code detection with tombstones for PHP ๐Ÿชฆ๐ŸงŸ

License: MIT License

Shell 0.08% PHP 97.64% CSS 0.85% HTML 1.43%

tombstone's Introduction

scheb/tombstone

Implements the concept of tombstones for dead code detection in PHP.

The library provides you with a toolbox to place, track and evaluate tombstones in your code.

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version Monthly Downloads Total Downloads License

Logo

What are Tombstones?

To get the basic idea, watch David Schnepper's 5 minute talk from Velocity Santa Clara 2014.

Tombstone Youtube Video

When you want to identify and clean-up dead code in a project, static code analysis tools are the weapon of choice. But these tools have some limitations, especially in a dynamic language like PHP:

  • They can only tell you, if a piece of code is referenced, not if it's actually used
  • They cannot resolve dynamic or generated call paths

Tombstones provide a way to track if a piece of code is actually invoked. They are executable markers in your code, that you can place where you suspect dead code. Then, you collect tombstone invocations on production. After a while, the logs will tell you, which tombstones are dead and which ones aren't (the so called "vampires").

Installation

The library consists of multiple components, that need to be installed and configured independently:

Read how to install scheb/tombstone-logger for placing and logging tombstones in your code.

Read how to install scheb/tombstone-analyzer, which takes log data from scheb/tombstone-logger to generate reports in various formats. For example an HTML report:

Dashboard view Code view

Security

For information about the security policy and know security issues, see SECURITY.md.

Contributing

Want to contribute to this project? See CONTRIBUTING.md.

License

This software is available under the MIT license.

Acknowledgments

The library is heavily inspired by Nestoria.com's implementation of the tombstone concept.

Thanks to Jordi Boggiano for creating Monolog, from where I lend the handler/formatter concept.

The tombstone graphic is based on a licensed illustration by "lemonadeserenade".

Support Me

I'm developing this library since 2015. I love to hear from people using it, giving me the motivation to keep working on my open source projects.

If you want to let me know you're finding it useful, please consider giving it a star โญ on GitHub.

If you love my work and want to say thank you, you can help me out for a beer ๐Ÿป๏ธ via PayPal.

tombstone's People

Contributors

scheb avatar swarrenwecareconnectorg avatar rob-rg-schwarzberg avatar x-coder264 avatar dav-m85 avatar topikito avatar simoheinonen avatar ghispi avatar lyudmild avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.