Skip to content

Commit 2f1ba2b

Browse files
committed
feat: add language-specific causes of death
1 parent b7bc93b commit 2f1ba2b

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

src/lib/scoring.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,38 @@ export function determineCauseOfDeath(repo: RepoData): string {
9292
score: isJS && daysSince > 365 ? 5 : 0,
9393
cause: 'Lost in dependency hell',
9494
},
95+
{
96+
score: repo.language?.toLowerCase() === 'php' && daysSince > 365 ? 5 : 0,
97+
cause: 'Died of PHP fatigue',
98+
},
99+
{
100+
score: repo.language?.toLowerCase() === 'ruby' && daysSince > 365 ? 5 : 0,
101+
cause: 'Gemfile.lock never unlocked',
102+
},
103+
{
104+
score: repo.language?.toLowerCase() === 'python' && daysSince > 365 ? 5 : 0,
105+
cause: 'Pip froze, then everything else did',
106+
},
107+
{
108+
score: repo.language?.toLowerCase() === 'perl' && daysSince > 365 ? 5 : 0,
109+
cause: 'Nobody could read it, including the author',
110+
},
111+
{
112+
score: repo.language?.toLowerCase() === 'java' && daysSince > 365 ? 5 : 0,
113+
cause: 'OutOfMemoryError: human patience exceeded',
114+
},
115+
{
116+
score: repo.language?.toLowerCase() === 'go' && daysSince > 365 ? 5 : 0,
117+
cause: 'if err != nil { give up }',
118+
},
119+
{
120+
score: repo.language?.toLowerCase() === 'rust' && daysSince > 365 ? 5 : 0,
121+
cause: 'The borrow checker won',
122+
},
123+
{
124+
score: repo.language?.toLowerCase() === 'c++' && daysSince > 365 ? 5 : 0,
125+
cause: 'Segfaulted into the void',
126+
},
95127
{
96128
score: descLower.includes('microservice') || descLower.includes('enterprise') ? 5 : 0,
97129
cause: 'Killed by overengineering',

0 commit comments

Comments
 (0)