Created
March 11, 2025 08:14
-
-
Save alexander-schranz/1bc016ee637bb8995d67120b14091c16 to your computer and use it in GitHub Desktop.
PHPStan Baseline Timeline
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php -r '(function(string $baselineFile, string $branch) { | |
echo "date,count\\n"; | |
foreach (explode("\\n", `git log {$branch} --pretty="format:%H;%cI" --date-order --reverse {$baselineFile}`) as $line) { | |
[$hash, $date] = explode(";", $line); | |
preg_match_all("`^\\s+count:\\s+(\\d+)`m", `git show $hash:{$baselineFile}`, $matches); | |
echo $date, ",", array_sum(array_map("intval", $matches[1])), "\\n"; | |
} | |
})("phpstan-baseline.neon", "origin/3.0");' # branch name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment