Skip to content

Commit

Permalink
Fixup headers
Browse files Browse the repository at this point in the history
  • Loading branch information
aeslaughter committed Sep 3, 2021
1 parent cf47367 commit d964dc9
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 8 deletions.
12 changes: 4 additions & 8 deletions scripts/fixup_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# first to make sure there is a clean dry run of the files that should
# be updated

import os, string
import os
from optparse import OptionParser

global_ignores = ['contrib', '.svn']
Expand Down Expand Up @@ -37,8 +37,6 @@ def fixupHeader():
if ignore in dirnames:
dirnames.remove(ignore)

#print dirpath
#print dirnames
for file in filenames:
suffix = os.path.splitext(file)
if suffix[-1] == '.C' or suffix[-1] == '.h':
Expand All @@ -51,12 +49,12 @@ def checkAndUpdate(filename):
f.close()

# Check (exact match only)
if (string.find(text, copyright_header) == -1):
if copyright_header not in text:
# print the first 10 lines or so of the file
if global_options.update == False: # Report only
print filename + ' does not contain an up to date header'
print(filename + ' does not contain an up to date header')
if global_options.verbose == True:
print '>'*40, '\n', '\n'.join((text.split('\n', 10))[:10]), '\n'*5
print('>'*40, '\n', '\n'.join((text.split('\n', 10))[:10]), '\n'*5)
else:
# Update
f = open(filename + '~tmp', 'w')
Expand All @@ -71,5 +69,3 @@ def checkAndUpdate(filename):
parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False)
(global_options, args) = parser.parse_args()
fixupHeader()


14 changes: 14 additions & 0 deletions src/main.C
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/****************************************************************/
/* DO NOT MODIFY OR REMOVE THIS HEADER */
/* FALCON - Fracturing And Liquid CONvection */
/* */
/* (c) 2012 Battelle Energy Alliance, LLC */
/* ALL RIGHTS RESERVED */
/* */
/* Prepared by Battelle Energy Alliance, LLC */
/* Under Contract No. DE-AC07-05ID14517 */
/* With the U. S. Department of Energy */
/* */
/* See COPYRIGHT for full restrictions */
/****************************************************************/

/****************************************************************/
/* DO NOT MODIFY OR REMOVE THIS HEADER */
/* FALCON - Fracturing And Liquid CONvection */
Expand Down
14 changes: 14 additions & 0 deletions test/include/base/FalconTestApp.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/****************************************************************/
/* DO NOT MODIFY OR REMOVE THIS HEADER */
/* FALCON - Fracturing And Liquid CONvection */
/* */
/* (c) 2012 Battelle Energy Alliance, LLC */
/* ALL RIGHTS RESERVED */
/* */
/* Prepared by Battelle Energy Alliance, LLC */
/* Under Contract No. DE-AC07-05ID14517 */
/* With the U. S. Department of Energy */
/* */
/* See COPYRIGHT for full restrictions */
/****************************************************************/

/****************************************************************/
/* DO NOT MODIFY OR REMOVE THIS HEADER */
/* FALCON - Fracturing And Liquid CONvection */
Expand Down
14 changes: 14 additions & 0 deletions test/src/base/FalconTestApp.C
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/****************************************************************/
/* DO NOT MODIFY OR REMOVE THIS HEADER */
/* FALCON - Fracturing And Liquid CONvection */
/* */
/* (c) 2012 Battelle Energy Alliance, LLC */
/* ALL RIGHTS RESERVED */
/* */
/* Prepared by Battelle Energy Alliance, LLC */
/* Under Contract No. DE-AC07-05ID14517 */
/* With the U. S. Department of Energy */
/* */
/* See COPYRIGHT for full restrictions */
/****************************************************************/

/****************************************************************/
/* DO NOT MODIFY OR REMOVE THIS HEADER */
/* FALCON - Fracturing And Liquid CONvection */
Expand Down
14 changes: 14 additions & 0 deletions tpl/tetgen/tetgen.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/****************************************************************/
/* DO NOT MODIFY OR REMOVE THIS HEADER */
/* FALCON - Fracturing And Liquid CONvection */
/* */
/* (c) 2012 Battelle Energy Alliance, LLC */
/* ALL RIGHTS RESERVED */
/* */
/* Prepared by Battelle Energy Alliance, LLC */
/* Under Contract No. DE-AC07-05ID14517 */
/* With the U. S. Department of Energy */
/* */
/* See COPYRIGHT for full restrictions */
/****************************************************************/

///////////////////////////////////////////////////////////////////////////////
// //
// TetGen //
Expand Down
14 changes: 14 additions & 0 deletions unit/src/SampleTest.C
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/****************************************************************/
/* DO NOT MODIFY OR REMOVE THIS HEADER */
/* FALCON - Fracturing And Liquid CONvection */
/* */
/* (c) 2012 Battelle Energy Alliance, LLC */
/* ALL RIGHTS RESERVED */
/* */
/* Prepared by Battelle Energy Alliance, LLC */
/* Under Contract No. DE-AC07-05ID14517 */
/* With the U. S. Department of Energy */
/* */
/* See COPYRIGHT for full restrictions */
/****************************************************************/

//* This file is part of the MOOSE framework
//* https://www.mooseframework.org
//*
Expand Down
14 changes: 14 additions & 0 deletions unit/src/main.C
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/****************************************************************/
/* DO NOT MODIFY OR REMOVE THIS HEADER */
/* FALCON - Fracturing And Liquid CONvection */
/* */
/* (c) 2012 Battelle Energy Alliance, LLC */
/* ALL RIGHTS RESERVED */
/* */
/* Prepared by Battelle Energy Alliance, LLC */
/* Under Contract No. DE-AC07-05ID14517 */
/* With the U. S. Department of Energy */
/* */
/* See COPYRIGHT for full restrictions */
/****************************************************************/

//* This file is part of the MOOSE framework
//* https://www.mooseframework.org
//*
Expand Down

0 comments on commit d964dc9

Please sign in to comment.