Modify

Ticket #414 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

PhpLintTask: retrieving bad files

Reported by: pigulla@… Owned by: mrook
Priority: low Milestone: 2.4.0
Component: phing-tasks-ext Version: 2.3.3
Keywords: Cc:

Description

I'm currently trying to use the PhpLintTask to create a list of files that do not compile. Unfortunately, there is no "tofile" property, and subclassing the task doesn't help either since the badFiles member is private.

Is it possible to add a feature to PhpLintTask that writes a list of all bad files to a specific file?

Attachments

Change History

comment:1 Changed 2 years ago by mrook

(In [684]) Refs #414 - add 'tofile' attribute to write list of bad files to

comment:2 Changed 2 years ago by mrook

  • Status changed from new to closed
  • Resolution set to fixed

This issue has been fixed in the SVN tree, revision r684.

Thank you for the report, and for helping us make Phing better!

comment:3 Changed 2 years ago by pigulla@…

Nice, thanks. It would, however, be nice to include the error message in the output (e.g. "Parse error: syntax error, unexpected T_ECHO, expecting ';' in somefile.php on line 42"). Any chance of adding this functionality?

comment:4 Changed 2 years ago by mrook

The problem with that is that files can generate multiple error messages, and this is just a list of files that contain one or more errors.

comment:5 Changed 2 years ago by pigulla@…

Really? I was under the impression that phplint would either say the file is OK or abort as soon as it encounters a fatal or parse error (in which parsing is aborted and case no further errors are produced).

Be that as it may, how about giving the user the option to simply dump the entire output to a file? Although I would agree that this isn't particularly spiffy. Maye I'll just have to re-parse all files that didn't pass the linting. Shouldn't be that many anyways.

comment:6 Changed 2 years ago by mrook

(In [689]) Refs #414 - add error message to badfiles list

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.