B
Bil Kleb
Hi,
I would like to automate a code cleanup task which involves
finding warning messages like,
Warning: ../../LibF90/bc_inviscid.f90, line 1707:
DT explicitly imported into BC_INVISCID_FLUX but not used
detected at BC_INVISCID_FLUX@<end-of-statement>
and removing the offending unused import.
So, the tasks are roughly,
1) Goto line 1707 of the file
2) Search backward until line.match /\Wdt\W/i
3) Remove /dt/i
I'm stuck on an elegant, i.e., Ruby, way to do the first
two steps. Please point me toward the glittering light.
Thanks,
I would like to automate a code cleanup task which involves
finding warning messages like,
Warning: ../../LibF90/bc_inviscid.f90, line 1707:
DT explicitly imported into BC_INVISCID_FLUX but not used
detected at BC_INVISCID_FLUX@<end-of-statement>
and removing the offending unused import.
So, the tasks are roughly,
1) Goto line 1707 of the file
2) Search backward until line.match /\Wdt\W/i
3) Remove /dt/i
I'm stuck on an elegant, i.e., Ruby, way to do the first
two steps. Please point me toward the glittering light.
Thanks,