View Issue Details

IDProjectCategoryView StatusLast Update
0002264OpenFOAM[All Projects] Bugpublic2016-09-22 23:05
ReporterwyldckatAssigned Tohenry 
PrioritylowSeveritytrivialReproducibilityN/A
Status resolvedResolutionfixed 
Product Versiondev 
Fixed in Versiondev 
Summary0002264: Recent commit has a few old template definitions
DescriptionI noticed in today's commit 7a52d2a5b with the message "globalMeshData: Revert NULL -> nullptr", fixed a small detail that was done in commit 521d7a4ae.
Given that the message, I was curious and did a cursory glance at the commit 521d7a4ae and noticed a few "List<<T > >".

A bit of find+grep:

  find src applications/ -name "*.[CH]" -type f | xargs grep " > >"

found me the only file that had this older convention, namely in file "src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C"

I then checked for "> >" and it found "src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolverTypes.H".


Sorry for not providing a patch in file form, but the following commands do the trick:

  sed -i -e 's= > >=>>=' src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C
  sed -i -e 's=> >=>>=' src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolverTypes.H



Nonetheless, this brings me to ask: In which script file should we have checks for these coding conventions?
I know that the script "bin/tools/pre-commit-hook" will already do some of these checks, and I've used it with some success. But from past commits that I've seen, it doesn't seem to be always used, e.g. when the Copyright year is updated in another commit.
TagsNo tags attached.

Activities

henry

2016-09-22 21:03

manager   ~0006908

Thanks for picking this up, I didn't go through every line of the patch which was obviously based on an older version of OpenFOAM-dev. I have fixed the "> >" and will commit shortly.

This code check could be added to pre-commit-hook as well as NULL -> nullptr.

henry

2016-09-22 23:05

manager   ~0006909

Resolved by commit c169ca14f5152e37d4701cbb5c1191743e310c02

Issue History

Date Modified Username Field Change
2016-09-22 20:53 wyldckat New Issue
2016-09-22 20:53 wyldckat Status new => assigned
2016-09-22 20:53 wyldckat Assigned To => henry
2016-09-22 21:03 henry Note Added: 0006908
2016-09-22 23:05 henry Status assigned => resolved
2016-09-22 23:05 henry Resolution open => fixed
2016-09-22 23:05 henry Fixed in Version => dev
2016-09-22 23:05 henry Note Added: 0006909