import { CodeOfConductType , commonScorers , RepositoryScorer , UndesirableUsageChecker , } from "@atomist/sdm-pack-aspect" ; import { PowerShellLanguage , ShellLanguage , YamlLanguage , } from "@atomist/sdm-pack-sloc/lib/languages" ; import { TypeScriptProjectsMustUseTsLint } from "./nodeScorers" ; /**
 * Scorers to rate projects
 */ export function scorers ( ) { return [ commonScorers . anchorScoreAt ( 2 ) , commonScorers . penalizeForExcessiveBranches ( { branchLimit : 5 } ) , commonScorers . PenalizeMonorepos , TypeScriptProjectsMustUseTsLint , commonScorers . PenalizeNoLicense , commonScorers . limitLanguages ( { limit : 4 } ) , commonScorers . limitLinesOfCode ( { limit : 30000 } ) , commonScorers . limitLinesOfCodeIn ( { language : YamlLanguage , limit : 500 , freeAmount : 200 } ) , commonScorers . limitLinesOfCodeIn ( { language : PowerShellLanguage , limit : 200 , freeAmount : 100 } ) , commonScorers . limitLinesOfCodeIn ( { language : ShellLanguage , limit : 200 , freeAmount : 100 } ) , commonScorers . requireRecentCommit ( { days : 30 } ) , commonScorers . requireAspectOfType ( { type : CodeOfConductType , reason : "Repos should have a code of conduct" } ) , commonScorers . requireGlobAspect ( { glob : "CHANGELOG.md" } ) , commonScorers . requireGlobAspect ( { glob : "CONTRIBUTING.md" } ) , ] ; }