Skip to content

Commit e68bb1d

Browse files
committed
ci(gitattributes): Update export-ignore rules for builds
- Add new directories and files to export-ignore to streamline builds - Include .build, .chglog, docs, baselines, vendor, and configuration files - Ensure that documentation and tests are excluded from export for cleaner package distributions
1 parent c66d5d5 commit e68bb1d

File tree

13 files changed

+95
-55
lines changed

13 files changed

+95
-55
lines changed

.gitattributes

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,31 @@
22
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
33

44
# Ignore all test and documentation with "export-ignore".
5-
/.gitattributes export-ignore
6-
/.gitignore export-ignore
7-
/.travis.yml export-ignore
8-
/phpunit.xml.dist export-ignore
9-
/tests export-ignore
10-
/.editorconfig export-ignore
11-
/.php_cs export-ignore
12-
/.github export-ignore
13-
/psalm.xml export-ignore
5+
.build/ export-ignore
6+
.chglog/ export-ignore
7+
.github/ export-ignore
8+
baselines/ export-ignore
9+
#config/ export-ignore
10+
docs/ export-ignore
11+
#src/ export-ignore
12+
tests/ export-ignore
13+
vendor/ export-ignore
14+
vendor-bin/ export-ignore
15+
.editorconfig export-ignore
16+
.gitattributes export-ignore
17+
.gitignore export-ignore
18+
.lintmdrc export-ignore
19+
.php-cs-fixer.php export-ignore
20+
_ide_helper.php export-ignore
21+
CHANGELOG.md export-ignore
22+
composer.json export-ignore
23+
composer.lock export-ignore
24+
composer-dependency-analyser.php export-ignore
25+
composer-updater export-ignore
26+
LICENSE export-ignore
27+
monorepo-builder.php export-ignore
28+
phpstan.neon export-ignore
29+
phpunit.xml.dist export-ignore
30+
README.md export-ignore
31+
rector.php export-ignore
32+
tests.php export-ignore

.gitignore

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
1+
.build/
2+
.history/
13
.idea/
2-
.php_cs
3-
.phplint-cache
4-
.php_cs.cache
4+
vendor/
5+
6+
.DS_Store
57
.php-cs-fixer.cache
68
.phpunit.result.cache
7-
.build/
8-
composer.lock
9-
coverage/
109
clover.xml
10+
composer.lock
1111
phpunit.xml
1212
psalm.xml
13-
vendor/
1413
tests.*
15-
.DS_Store
16-
.history/
17-
composer.phar

.lintmdrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
{
22
"excludeFiles": [
3+
".build/",
4+
"baselines/",
5+
"config/",
36
"src/",
47
"tests/",
58
"vendor/",
9+
"vendor-bin/",
610
"./CHANGELOG.md"
711
],
812
"rules": {
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# total 1 error
2+
3+
parameters:
4+
ignoreErrors:
5+
-
6+
message: '#^Trying to invoke mixed but it''s not a callable\.$#'
7+
count: 1
8+
path: ../src/Channels/AbstractChannel.php

baselines/disallowed.function.neon

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# total 2 errors
2+
3+
parameters:
4+
ignoreErrors:
5+
-
6+
message: '#^Calling sha1\(\) is forbidden, use hash\(\) with at least SHA\-256 for secure hash, or password_hash\(\) for passwords\.$#'
7+
count: 1
8+
path: ../src/Channels/Channel.php
9+
10+
-
11+
message: '#^Calling env\(\) is forbidden, use config\(\) instead\.$#'
12+
count: 1
13+
path: ../src/Support/helpers.php

baselines/loader.neon

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# total 5 errors
12
includes:
3+
- callable.nonCallable.neon
4+
- disallowed.function.neon
25
- nullCoalesce.variable.neon
3-
- return.type.neon
6+
- offsetAccess.nonArray.neon
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# total 1 error
2+
3+
parameters:
4+
ignoreErrors:
5+
-
6+
message: '#^Cannot use array destructuring on mixed\.$#'
7+
count: 1
8+
path: ../src/Commands/TestCommand.php

baselines/return.type.neon

Lines changed: 0 additions & 8 deletions
This file was deleted.

composer-updater

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ $status = (new SingleCommandApplication)
144144
return $this;
145145
}
146146

147+
/**
148+
* @noinspection PhpUnusedPrivateMethodInspection
149+
*/
147150
private function normalizeComposerJson(): self
148151
{
149152
$this->mustRunCommand("$this->composerBinary normalize --diff --ansi");

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@
130130
"symplify/phpstan-rules": "^14.4",
131131
"symplify/vendor-patches": "^11.4",
132132
"tomasvotruba/class-leak": "^2.0",
133-
"tomasvotruba/type-coverage": "^2.0"
133+
"tomasvotruba/type-coverage": "^2.0",
134+
"yamadashy/phpstan-friendly-formatter": "^1.2"
134135
},
135136
"repositories": {
136137
"facade-documenter": {

0 commit comments

Comments
 (0)