Skip to content

Commit 85bd6ff

Browse files
authored
Merge pull request #131 from julio-cavallari/feat/change-default-path
feat(default-path): change the default path to project's root
2 parents e319f3a + 55c418d commit 85bd6ff

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

peck.json

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"ignore": {
44
"words": [
55
"php"
6+
],
7+
"paths": [
8+
"tests"
69
]
710
}
811
}

src/Console/Commands/CheckCommand.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,7 @@ private function inferProjectPath(): string
181181

182182
return match (true) {
183183
isset($_ENV['APP_BASE_PATH']) => $_ENV['APP_BASE_PATH'],
184-
default => match (true) {
185-
is_dir($basePath.'/app') => ($basePath.'/app'),
186-
is_dir($basePath.'/src') => ($basePath.'/src'),
187-
default => $basePath,
188-
},
184+
default => $basePath,
189185
};
190186
}
191187

stubs/presets/base.stub

+3
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,15 @@ oauth
6666
otp
6767
params
6868
parsable
69+
phpstan
70+
phpunit
6971
pinkary
7072
pinnable
7173
postgres
7274
pre
7375
propable
7476
psr
77+
readme
7578
recaptcha
7679
repo
7780
resizer

tests/.pest/snapshots/Console/OutputTest/it_may_pass.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
........................................
1+
...................................................................
22

33
PASS No misspellings found in your project.
44

tests/Unit/ConfigTest.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
expect($config->whitelistedWords)->toBe([
1111
'php',
12-
])->and($config->whitelistedPaths)->toBe([]);
12+
])->and($config->whitelistedPaths)->toBe([
13+
'tests',
14+
]);
1315
});
1416

1517
it('should to be a singleton', function (): void {
@@ -53,5 +55,7 @@
5355
->and($config->whitelistedWords)->toBe([
5456
'php',
5557
])
56-
->and($config->whitelistedPaths)->toBe([]);
58+
->and($config->whitelistedPaths)->toBe([
59+
'tests',
60+
]);
5761
});

0 commit comments

Comments
 (0)