@@ -4,7 +4,7 @@ import { runBaseDocsRules } from './rules/base-docs.rule';
44import { runFeatureDocsRules } from './rules/feature-docs.rule' ;
55import { validateFeatureNameRule , normalizeFeatureName } from './rules/feature-name.rule' ;
66import { runGitWorktreeRules } from './rules/git-worktree.rule' ;
7- import { LintCheckResult , LintDependencies , LintOptions , LintReport } from './types' ;
7+ import { FeatureTarget , LintCheckResult , LintDependencies , LintOptions , LintReport } from './types' ;
88
99const defaultDependencies : LintDependencies = {
1010 cwd : ( ) => process . cwd ( ) ,
@@ -34,7 +34,16 @@ export function runLintChecks(
3434 return finalizeReport ( cwd , checks ) ;
3535 }
3636
37- const featureValidation = validateFeatureNameRule ( options . feature ) ;
37+ return runFeatureChecks ( cwd , checks , options . feature , deps ) ;
38+ }
39+
40+ function runFeatureChecks (
41+ cwd : string ,
42+ checks : LintCheckResult [ ] ,
43+ rawFeature : string ,
44+ deps : LintDependencies
45+ ) : LintReport {
46+ const featureValidation = validateFeatureNameRule ( rawFeature ) ;
3847 if ( featureValidation . check ) {
3948 checks . push ( featureValidation . check ) ;
4049 return finalizeReport ( cwd , checks , featureValidation . target ) ;
@@ -49,7 +58,7 @@ export function runLintChecks(
4958function finalizeReport (
5059 cwd : string ,
5160 checks : LintCheckResult [ ] ,
52- feature ?: { raw : string ; normalizedName : string ; branchName : string }
61+ feature ?: FeatureTarget
5362) : LintReport {
5463 const summary = checks . reduce (
5564 ( acc , check ) => {
0 commit comments