overtrue / phplint

:bug: A tool that can speed up linting of php files by running several lint processes at once.
MIT License
988 stars 88 forks source link

[9.0.x] Analyse multiple path at same time did not work with console command #185

Closed llaville closed 1 year ago

llaville commented 1 year ago

New Issue

Diagnose

All distributions (source code via Composer installation, Docker image, PHAR version) are impacted by this issue.

Summary

Analyse multiple path at same time did not work with console command

Expected behaviour

Be able to scan multiple directories at same time

Actual behaviour

Only first directory is scanned

bin/phplint --no-configuration --ignore-exit-code -vvv src/ examples/ tests/
phplint 9.0.3 by overtrue and contributors.

Runtime       : PHP 8.1.14
Configuration : No config file loaded

┌──────────────────┬──────────────────┬─────────┐
│ Name             │ Value            │ Help    │
├──────────────────┼──────────────────┼─────────┤
│ path             │ ["src/"]         │ command │
├──────────────────┼──────────────────┼─────────┤
│ configuration    │ ".phplint.yml"   │ command │
│ no-configuration │ true             │ command │
│ exclude          │ []               │ command │
│ extensions       │ ["php"]          │ command │
│ jobs             │ 5                │ command │
│ no-cache         │ false            │ command │
│ cache            │ ".phplint.cache" │ command │
│ no-progress      │ false            │ command │
│ progress         │ "printer"        │ command │
│ log-json         │ null             │ command │
│ log-junit        │ null             │ command │
│ warning          │ false            │ command │
│ memory-limit     │ "512M"           │ command │
│ ignore-exit-code │ true             │ command │
└──────────────────┴──────────────────┴─────────┘

Time: < 1 sec, Memory: 6.0 MiB, Cache: 34 hits, 0 miss

 [OK] 34 files
llaville commented 1 year ago

Works as expected when using multiple paths with configuration YAML file :

path:
  - ./src
  - ./tests
jobs: 10
extensions:
  - php
exclude:
  - vendor
warning: true
memory-limit: -1
no-cache: false
log-json: false
log-junit: false

Running command (from PHPLint Git clone copy of source code) :

bin/phplint -vvv

Gave following results :

multiple-paths multiple-paths-results

llaville commented 1 year ago

Fix results by image 😄

fix-issue-185