Skip to content
Snippets Groups Projects
Commit 76fcedc7 authored by Campbell Barton's avatar Campbell Barton
Browse files

trailing_space_clean: update (clean nearly all files)

parent 87f7038e
No related branches found
No related tags found
No related merge requests found
...@@ -8,25 +8,15 @@ PATHS = ( ...@@ -8,25 +8,15 @@ PATHS = (
"intern/ghost", "intern/ghost",
"release/scripts/modules", "release/scripts/modules",
"release/scripts/startup", "release/scripts/startup",
"source/blender/blenfont", "source",
"source/blender/blenlib",
"source/blender/blentranslation",
"source/blender/bmesh",
"source/blender/collada",
"source/blender/datatoc",
"source/blender/draw", # blender2.8 branch only.
"source/blender/editors",
"source/blender/gpu",
"source/blender/ikplugin",
"source/blender/makesrna",
"source/blender/nodes",
"source/blender/physics",
"source/blender/python",
"source/blender/render",
"source/blender/windowmanager",
"tests", "tests",
# files
"GNUmakefile",
"make.bat",
) )
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath( SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(
os.path.join(os.path.dirname(__file__), "..", "..", "..")))) os.path.join(os.path.dirname(__file__), "..", "..", ".."))))
...@@ -34,3 +24,19 @@ PATHS = tuple( ...@@ -34,3 +24,19 @@ PATHS = tuple(
os.path.join(SOURCE_DIR, p.replace("/", os.sep)) os.path.join(SOURCE_DIR, p.replace("/", os.sep))
for p in PATHS for p in PATHS
) )
def files(path, test_fn):
for dirpath, dirnames, filenames in os.walk(path):
# skip '.git'
dirnames[:] = [d for d in dirnames if not d.startswith(".")]
for filename in filenames:
if test_fn(filename):
filepath = os.path.join(dirpath, filename)
yield filepath
PATHS = PATHS + tuple(
files(
os.path.join(SOURCE_DIR),
lambda filename: filename in {"CMakeLists.txt"} or filename.endswith((".cmake"))
)
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment