Sitecore / Sitecore.Pathfinder

Get started, get far, get happy!
Other
34 stars 12 forks source link

Errors in checkers should abort the build #42

Closed adeneys closed 7 years ago

adeneys commented 8 years ago

Currently checkers write their findings to the trace. Although this provides feedback to the user, it doesn't allow aborting the build if fatal errors are found.

Instead, checkers should each return a status with an error level. Error levels would be:

By default the build would abort for error or higher. Warnings and infos would just be output to the trace for the user. The error level to abort the build at would be configurable by the user in the scconfig.json file. This would allow users to abort the build only on critical errors or even for all warnings.

JakobChristensen commented 8 years ago

I think you would want as many errors as possible per compile, so you can fix all in one go, before compiling again.

Do the C# compile have a concept like a critical error - I have never encountered it.

The only thing I can think of, is treating warnings like errors.

That being said, I think we could have checkers abort the build, if it really makes no sense to continue, so I am open to the idea.

adeneys commented 8 years ago

I agree. Checkers would return a status, but all checkers would be run. Then the maximum error code would be used to determine if the toolchain should continue.

Point taken about the critical error, we can probably just leave it with info, warning and error.

JakobChristensen commented 7 years ago

The 'publish-project' task now checks project diagnostics before running. Any errors and the task is aborted.