Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Phing build would support a 'Strict' mode, which indicates to consider a warning as an error and raises a buildException to abort the build process.
Ticket
http://www.phing.info/trac/ticket/918
Specs
Phing build would support a 'Strict' mode, with the default value as Off (to enable backward compatibility until complete future migration). The 'strict' mode, when enabled, considers all the warnings (which are raised with "MSG_WARN" level) as an error, and raises a buildException to abort the build process.
This pull request adds the following functionalities:
The Project tag supports new attribute - strict (boolean), indicating the build process mode.
The Phing command-line utility would support two new parameters:
-strict runs build in strict mode, considering a warning as error
-no-strict runs build normally. (overrides build file attribute)
The command-line switches over-rides the 'Build File' "Project::Strict" attribute information.
A sample target which builds in 'strict' mode:
I understand, that the current Phing implementation does not consider the 'warnings' as a separate entity, but part of LogLevel. Therefore, currently, this implementation would have limited capability. But considering this as a starting point, we can utilize the future approach designing.
Legacy PR
#159
Thanks,
Utsav