If there is hint or warning the compiler cancels the compilation

5

I would like to compile an application and if it has some Hint or Warning , execution is suspended, giving rise to an error.

Does anyone know if it's possible?

Edit1: Warning's can be treated as errors. But is there anything that could make Hint's also be treated as errors?

    
asked by anonymous 15.09.2017 / 04:44

2 answers

2

Whenever you click the Shift + F9 keys used to make a Build project, an Messages box is created where you can view the hint and% with% of the project, whenever there are ERROR Delphi does not let the project run.

Example with Hint :

ExamplewithWarning:

Asmentionedby@JuniorMoreiratoedittheHintandWarningtoappearjustgotoTabProject->Options->DelphiCompiler->HintsandWarnings.

YoucanalsomakeaBuildprojectbyclickingTabProject->BuildProject.

EDIT1:

TheonlyavailableoptionstochoosefromarewarningorTRUEinthecaseofOutputsHintsasyoucanseeintheimagebelow:

UnliketheOutputWarningsthatcanhavetheoptionFALSEyoucanchecktheimagebelow:

    
15.09.2017 / 12:18
3

Yes it is possible,

Access Project, Option, Delphi Compiler ... and in Hints and Warnings you configure it.

Ex. Deprected Symbol, when there is a declared and unused variable, it generates a HINT, you can configure it to be an ERROR.

This way the Application compilation did not happen!

Obs. You can configure Release for this and leave Debug like this. That way the Final Application will be guaranteed without Hints and Warnings.

    
15.09.2017 / 13:13