ufs-community / UFS_UTILS

Utilities for the NCEP models.
Other
21 stars 104 forks source link

Confirm warning-free builds in UFS_UTILS in GitHub actions #451

Open edwardhartnett opened 3 years ago

edwardhartnett commented 3 years ago

The next step in quality improvement is to add checking for warnings in the CI. This will prevent code with warnings from being checked in.

First, of course, we must build without warnings. ;-)

edwardhartnett commented 1 year ago

Warnings are bad for the following reasons: 1 - Some warnings point to real bugs in the code that need to be fixed. 2 - Many other warnings are harmless, but obscure very important warnings of type 1. 3 - Warnings indicate careless programming. Just as people are more likely to litter a street that is already covered in trash, so programmers are much more likely to be careless with code on a project that does not enforce sufficient discipline with warnings.

Many of the current UFS_UTILS warnings are trivial things like unused variables.

Can we please start to clear up warnings in the code? @GeorgeGayno-NOAA this is the kind of code cleanup that needs to be happening in the background,

Warnings must be monitored and removed from all new code contributions. Until the code builds warning-free, and this check can be automated, it must be done manually for all contributions. That is, for each PR, go look in the developer workflow (which builds with -Wall) and see what warnings have been introduced - and then require that they be fixed before the PR is merged.

Many of the other NCEPLIBS projects now build warning-free. It's not hard, and worth achieving.