AdaCore / Ada_Drivers_Library

Ada source code and complete sample GNAT projects for selected bare-board platforms supported by GNAT.
BSD 3-Clause "New" or "Revised" License
240 stars 141 forks source link

Optional style checks and warning as error switches #273

Closed Fabien-Chouteau closed 5 years ago

Fabien-Chouteau commented 6 years ago

Enforcing style checks only in Production mode doesn't lower the quality of the code base since all contributions have to compile in Production before they can be merged (enforced by CI and GitHub rules).

On the other hand disabling style checks for debug mode means it is easier and more friendly to play with the library and the examples.

Part of #271

pmderodat commented 6 years ago

This feels a bit backwards: it’s considered good practice not to abort production builds because of style checks or warnings, as it may break the compilation of one release in the future with a new compiler… So unless the CI builds in a special mode (Prod + error on warnings/stylechecks), you lose these checks.

Isn’t it possible instead to somehow tune project files so that examples are not built in production mode but the library itself is?

Fabien-Chouteau commented 6 years ago

@pmderodat New version:

This patch makes style checks and warning as error switches controllable with a scenario variable: ADL_BUILD_CHECKS (disabled by default).

With this we can enforce style checks on all contributions by enabling ADL_BUILD_CHECKS in testsuite runs and CI builds.

On the other hand the checks are disabled by default which means it is easier and more friendly to play with the library and the examples.

Fabien-Chouteau commented 5 years ago

The AppVeyor build timed out once again...

I think we have to disable the dual builds of Debug and Production modes.