Skip to content

Commit e37e4e3

Browse files
committed
feat(scoring): add language-specific causes of death
Closes #10. Extends determineCauseOfDeath() with 7 new language-specific rules beyond the existing JavaScript one: - PHP → Died of PHP fatigue - Ruby → Gemfile.lock never unlocked - Python → Pip froze, then everything else did - Perl → Nobody could read it, including the author - CoffeeScript → Outlived by the thing it inspired - Objective-C → Swift happened - Scala → Compilation finished, interest did not Language-specific rules follow the existing isJS pattern: score 5 when the repo's primary language matches and daysSince > 365 (except CoffeeScript, which is punished on language alone because it's dead by definition). Existing 32 tests still pass; no rule changes to the universal checks.
1 parent b7bc93b commit e37e4e3

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

src/lib/scoring.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,34 @@ 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() === 'coffeescript' ? 5 : 0,
113+
cause: 'Outlived by the thing it inspired',
114+
},
115+
{
116+
score: repo.language?.toLowerCase() === 'objective-c' && daysSince > 365 ? 5 : 0,
117+
cause: 'Swift happened',
118+
},
119+
{
120+
score: repo.language?.toLowerCase() === 'scala' && daysSince > 365 ? 5 : 0,
121+
cause: 'Compilation finished, interest did not',
122+
},
95123
{
96124
score: descLower.includes('microservice') || descLower.includes('enterprise') ? 5 : 0,
97125
cause: 'Killed by overengineering',

0 commit comments

Comments
 (0)