Skip to content

Add log to file option - cannot isolate which file lint is hanging on #123

Open
@johnwarde

Description

@johnwarde

Currently, I do not see an option to log progress to a text file e.g. log which files have been processed.

My scenario ...

I am executing via PHAR 1.3.2 on the current folder:
C:/xampp/php/php C:\scms\parallel-lint.phar --exclude .git .

This particular local repository it is hanging for some unknown reason. This is the output ...

Xdebug: [Step Debug] Time-out connecting to debugging client, waited: 200 ms. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
PHP 7.4.29 | 10 parallel jobs
............................................................   60/1169 (5 %)
............................................................  120/1169 (10 %)
............................................................  180/1169 (15 %)
............................................................  240/1169 (20 %)
............................................................  300/1169 (25 %)
............................................................  360/1169 (30 %)
............................................................  420/1169 (35 %)
.................................X..X.......................  480/1169 (41 %)
............................................................  540/1169 (46 %)
............................................................  600/1169 (51 %)
............................................................  660/1169 (56 %)
............................................................  720/1169 (61 %)
............................................................  780/1169 (66 %)
............................................................  840/1169 (71 %)
............................................................  900/1169 (76 %)
............................................................  960/1169 (82 %)
............................................................ 1020/1169 (87 %)
............................................................ 1080/1169 (92 %)
............................................................ 1140/1169 (97 %)
..........................^C

The ^C is me hitting the Ctrl+C after I've waited minutes.

When I exclude the "application" folder within the repository, it completes ...

C:/xampp/php/php C:\scms\parallel-lint.phar --exclude application --exclude .git .
Xdebug: [Step Debug] Time-out connecting to debugging client, waited: 200 ms. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
PHP 7.4.29 | 10 parallel jobs
............................................................  60/179 (33 %)
............................................................ 120/179 (67 %)
...........................................................  179/179 (100 %)

Checked 179 files in 1.6 seconds
No syntax error found

Since the tool is multi-threaded, I assume that all but one thread completes all the other files in the repository except a single file (within the "application" folder) which a single thread stalls on. From the numbers above it will be extremely time consuming to attempt to isolate a single file amongst 990 files (1169 - 179) within the application folder using multiple --exclude parameters.

By logging progress to a file per file processed, this will help isolate the offending file. Maybe logging when a file as starting processing too?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions