Cantera / cantera

Chemical kinetics, thermodynamics, and transport tool suite
https://cantera.org
Other
582 stars 342 forks source link

Add CI linting for some code style issues #1566

Closed speth closed 11 months ago

speth commented 11 months ago

Automate checks for some formatting issues that are easy to miss during pull request reviews.

Changes proposed in this pull request

If applicable, provide an example illustrating new features this pull request is introducing

CI will indicate failure and logs will include messages like the following for whitespace issues:

include/cantera/kinetics/Kinetics.h:48: trailing whitespace.
+//! reversible with a reverse rate satisfying detailed balance, include  
include/cantera/kinetics/Kinetics.h:55: trailing whitespace.
+//! A kinetics manager implements a kinetics model. Since the model equations  
include/cantera/kinetics/Kinetics.h:56: trailing whitespace.
+//! may be complex and expensive to evaluate, a kinetics manager may adopt 

And like this for bare /*! comment blocks (without a preceding //! block to provide the "brief" description):

------ include/cantera/kinetics/Kinetics.h ------

    /*!
     * Takes as input an array of properties for all species in the mechanism
     * and copies those values belonging to a particular phase to the output
     * array.
     * @param data Input data array.
     * @param phase Pointer to one of the phase objects participating in this
     *     reaction mechanism
     * @param phase_data Output array where the values for the the specified
     *     phase are to be written.
     * @deprecated Unused. To be removed after %Cantera 3.0.
     */

Checklist

codecov[bot] commented 11 months ago

Codecov Report

Merging #1566 (b7a59f9) into main (3332319) will decrease coverage by 0.02%. The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1566      +/-   ##
==========================================
- Coverage   70.52%   70.50%   -0.02%     
==========================================
  Files         379      379              
  Lines       59110    59110              
  Branches    21232    21232              
==========================================
- Hits        41688    41678      -10     
- Misses      14347    14356       +9     
- Partials     3075     3076       +1     

see 4 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

ischoegl commented 11 months ago

1561 is updated to preempt issues.