qossmic / deprecation-detector

MIT License
391 stars 40 forks source link

Checks against your own code #105

Open theofidry opened 8 years ago

theofidry commented 8 years ago

If I understand right right now running check script ruleset, it check any usage of deprecated call inside script based on the @deprecated annotations defined by the ruleset (usually vendor or composer.lock).

However you might want to use this tool four handling migration in your own app, ex:

/**
 * @deprecated Use NewModel instead
 */
class LegacyModel {...}

class NewModel {...}

This is doable by running deprecation-detector src src for example, but I find it weird. Plus that means in this use case, you actually have to run two times the command:

$ deprecation-detector src composer.lock
$ deprecation-detector src src

It would make more sense IMO to include src (or rather the directory being checked) to the ruleset by default.

MarvinKlemp commented 8 years ago

Good catch :+1: