Skip to content

Commit

Permalink
name-collision-detector
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Sep 13, 2023
1 parent fc7c028 commit 95cdbe5
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 2 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,25 @@ jobs:

- name: "Composer Require Checker"
run: "make composer-require-checker"

name-collision:
name: "Name Collision Detector"

runs-on: "ubuntu-latest"
timeout-minutes: 60

steps:
- name: "Checkout"
uses: actions/checkout@v3

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "8.2"

- name: "Install dependencies"
run: "composer install --no-interaction --no-progress"

- name: "Name Collision Detector"
run: "make name-collision"
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,6 @@ phpstan-pro:

composer-require-checker:
php build/composer-require-checker.phar check --config-file $(CURDIR)/build/composer-require-checker.json

name-collision:
php vendor/bin/detect-collisions
14 changes: 14 additions & 0 deletions collision-detector.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"scanPaths": ["src", "build", "tests"],
"excludePaths": [
"tests/PHPStan/Analyser/data/parse-error.php",
"tests/PHPStan/Analyser/data/multipleParseErrors.php",
"tests/PHPStan/Parser/data/cleaning-1-before.php",
"tests/PHPStan/Parser/data/cleaning-1-after.php",
"tests/PHPStan/Rules/Functions/data/duplicate-function.php",
"tests/PHPStan/Rules/Classes/data/duplicate-class.php",
"tests/notAutoloaded",
"tests/PHPStan/Rules/Functions/data/define-bug-3349.php",
"tests/PHPStan/Levels/data/stubs/function.php"
]
}
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
"phpstan/phpstan-phpunit": "^1.0",
"phpstan/phpstan-strict-rules": "^1.5.1",
"phpunit/phpunit": "^9.5.4",
"rector/rector": "^0.17"
"rector/rector": "^0.17",
"shipmonk/name-collision-detector": "dev-master"
},
"config": {
"platform": {
Expand Down
59 changes: 58 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 95cdbe5

Please sign in to comment.