fortpy icon indicating copy to clipboard operation
fortpy copied to clipboard

bestprac.py doesn't parse Camel Case types properly.

Open wsmorgan opened this issue 8 years ago • 0 comments

Within fortpy all the variables are changed to lower case to be self consistent. When bestprac.py runs it tries to find these variables in the codes and verify that all the assignments for the type have been made. However when the variable is camel case then bestprac.py doesn't find them at all. For example bestprac.py returns:

wileymorgan$ bestprac.py . -check all
Running pointer checks
Best practice suggestions: ./derivative_structure_generator.f90
   Subroutine 'get_dvector_permutations' does not set the value of members 'RotIndx, perm, v' in parameter 'drplist'.
   Subroutine 'organize_rotperm_lists' does not set the value of members 'RotIndx, perm, v' in parameter 'rdrplist'.

Inside of organize_rotperm_lists we find:

       rdRPList(iL)%nL = nL
       rdRPList(iL)%perm = tList(iL)%perm
       rdRPList(iL)%v => null()
       rdRPList(iL)%RotIndx => null()

Clearly rdRPList and rdrplist are the same but bestprac.py does not recognize that.

wsmorgan avatar May 18 '16 18:05 wsmorgan