Skip to content

Commit bf01916

Browse files
committed
Adds an AI-related glob preset
1 parent b31f8d9 commit bf01916

5 files changed

Lines changed: 148 additions & 40 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
77

88
## [Unreleased]
99

10+
## [v5.7.2] - 2026-05-01
11+
12+
### Added
13+
- Expanded the common glob preset with AI-related preset patterns.
14+
1015
## [v5.7.1] - 2026-04-30
1116

1217
### Fixed
13-
- Update symfony/* version constraints. Closes [#66](https://github.com/raphaelstolt/lean-package-validator/issues/66).
18+
- Updated symfony/* version constraints. Closes [#66](https://github.com/raphaelstolt/lean-package-validator/issues/66).
1419

1520
## [v5.7.0] - 2026-04-30
1621

src/Presets/CommonPreset.php

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,38 @@
66

77
class CommonPreset
88
{
9+
private array $aiGlob = [
10+
'AGENT.md',
11+
'AGENTS.md',
12+
'CLAUDE.md',
13+
'GEMINI.md',
14+
'AI.md',
15+
'AIDER.md',
16+
'CURSOR.md',
17+
'COPILOT.md',
18+
'CODEX.md',
19+
'QWEN.md',
20+
'WINDSURF.md',
21+
'.aiassistant',
22+
'.aider*',
23+
'.cursor',
24+
'.cursor/**',
25+
'.github/copilot-instructions.md',
26+
'.windsurf',
27+
'.windsurf/**',
28+
'.claude',
29+
'.claude/**',
30+
'.gemini',
31+
'.gemini/**',
32+
'.codex',
33+
'.codex/**',
34+
'llms.txt',
35+
'llms-full.txt',
36+
];
37+
938
protected function getCommonGlob(): array
1039
{
11-
return [
40+
return array_merge($this->aiGlob, [
1241
'.*',
1342
'*.txt',
1443
'*.{md,MD}',
@@ -17,7 +46,6 @@ protected function getCommonGlob(): array
1746
'*.xml',
1847
'*.yml',
1948
'*.dist.*',
20-
'llms.*',
2149
'.githooks',
2250
'*.dist',
2351
'{B,b}uild*',
@@ -32,7 +60,7 @@ protected function getCommonGlob(): array
3260
'LICENSE',
3361
'{M,m}ake',
3462
'*.{png,gif,jpeg,jpg,webp}',
35-
];
63+
]);
3664
}
3765

3866
/**

tests/AnalyserTest.php

Lines changed: 59 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,40 +1535,65 @@ public function returnsExpectedDefaultGlobPatterns(): void
15351535
'*.yml',
15361536
'*.{md,MD}',
15371537
'*.{png,gif,jpeg,jpg,webp}',
1538-
'*debugbar.json',
1539-
'.*',
1540-
'LICENSE',
1541-
'RMT',
1542-
'appveyor.yml',
1543-
'box.json',
1544-
'captainhook.json',
1545-
'collision-detector*',
1546-
'composer-dependency-analyser*',
1547-
'ecs*',
1548-
'infection*',
1549-
'llms.*',
1550-
'.githooks',
1551-
'package*',
1552-
'peck.json',
1553-
'phpinsights*',
1554-
'phpkg.con*',
1555-
'phpstan*',
1556-
'phpunit*',
1557-
'pint.{json,php}',
1558-
'rector*',
1559-
'renovate.json',
1560-
'sonar*',
1561-
'{A,a}rt*',
1562-
'{A,a}sset*',
1563-
'{B,b}uild*',
1564-
'{D,d}ist',
1565-
'{D,d}oc*',
1566-
'{E,e}xample*',
1567-
'{M,m}ake',
1568-
'{S,s}pec*',
1569-
'{T,t}est*',
1570-
'{T,t}ool*',
1571-
'{{M,m}ake,{B,b}ox,{V,v}agrant,{P,p}hulp}file',
1538+
'*debugbar.json',
1539+
'.*',
1540+
'.aiassistant',
1541+
'.aider*',
1542+
'.claude',
1543+
'.claude/**',
1544+
'.codex',
1545+
'.codex/**',
1546+
'.cursor',
1547+
'.cursor/**',
1548+
'.gemini',
1549+
'.gemini/**',
1550+
'.github/copilot-instructions.md',
1551+
'.githooks',
1552+
'.windsurf',
1553+
'.windsurf/**',
1554+
'AGENT.md',
1555+
'AGENTS.md',
1556+
'AI.md',
1557+
'AIDER.md',
1558+
'CLAUDE.md',
1559+
'CODEX.md',
1560+
'COPILOT.md',
1561+
'CURSOR.md',
1562+
'GEMINI.md',
1563+
'LICENSE',
1564+
'llms-full.txt',
1565+
'llms.txt',
1566+
'QWEN.md',
1567+
'RMT',
1568+
'WINDSURF.md',
1569+
'appveyor.yml',
1570+
'box.json',
1571+
'captainhook.json',
1572+
'collision-detector*',
1573+
'composer-dependency-analyser*',
1574+
'ecs*',
1575+
'infection*',
1576+
'package*',
1577+
'peck.json',
1578+
'phpinsights*',
1579+
'phpkg.con*',
1580+
'phpstan*',
1581+
'phpunit*',
1582+
'pint.{json,php}',
1583+
'rector*',
1584+
'renovate.json',
1585+
'sonar*',
1586+
'{A,a}rt*',
1587+
'{A,a}sset*',
1588+
'{B,b}uild*',
1589+
'{D,d}ist',
1590+
'{D,d}oc*',
1591+
'{E,e}xample*',
1592+
'{M,m}ake',
1593+
'{S,s}pec*',
1594+
'{T,t}est*',
1595+
'{T,t}ool*',
1596+
'{{M,m}ake,{B,b}ox,{V,v}agrant,{P,p}hulp}file',
15721597
];
15731598

15741599
$defaultGlobPattern = $analyser->getDefaultGlobPattern();

tests/Commands/InitCommandTest.php

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,32 @@ public function createsExpectedDefaultLpvFile(): void
8383
CONTENT;
8484

8585
$expectedDefaultLpvFileContent = <<<CONTENT
86+
AGENT.md
87+
AGENTS.md
88+
CLAUDE.md
89+
GEMINI.md
90+
AI.md
91+
AIDER.md
92+
CURSOR.md
93+
COPILOT.md
94+
CODEX.md
95+
QWEN.md
96+
WINDSURF.md
97+
.aiassistant
98+
.aider*
99+
.cursor
100+
.cursor/**
101+
.github/copilot-instructions.md
102+
.windsurf
103+
.windsurf/**
104+
.claude
105+
.claude/**
106+
.gemini
107+
.gemini/**
108+
.codex
109+
.codex/**
110+
llms.txt
111+
llms-full.txt
86112
.*
87113
*.txt
88114
*.{md,MD}
@@ -91,7 +117,6 @@ public function createsExpectedDefaultLpvFile(): void
91117
*.xml
92118
*.yml
93119
*.dist.*
94-
llms.*
95120
.githooks
96121
*.dist
97122
{B,b}uild*

tests/Commands/RefreshCommandTest.php

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,38 @@ public function printsMergedContentWithoutWritingAFile(): void
6666
*.lock
6767
SOME_FILE
6868
.SOME_DIRECTORY/
69+
AGENT.md
70+
AGENTS.md
71+
CLAUDE.md
72+
GEMINI.md
73+
AI.md
74+
AIDER.md
75+
CURSOR.md
76+
COPILOT.md
77+
CODEX.md
78+
QWEN.md
79+
WINDSURF.md
80+
.aiassistant
81+
.aider*
82+
.cursor
83+
.cursor/**
84+
.github/copilot-instructions.md
85+
.windsurf
86+
.windsurf/**
87+
.claude
88+
.claude/**
89+
.gemini
90+
.gemini/**
91+
.codex
92+
.codex/**
93+
llms.txt
94+
llms-full.txt
6995
*.{md,MD}
7096
*.rst
7197
*.toml
7298
*.xml
7399
*.yml
74100
*.dist.*
75-
llms.*
76101
.githooks
77102
*.dist
78103
{B,b}uild*

0 commit comments

Comments
 (0)