Skip to content

Commit 112fef8

Browse files
committed
refactor: Remove obsolete files across all workspaces and add tests
1 parent 7bf287e commit 112fef8

File tree

12 files changed

+14
-36
lines changed

12 files changed

+14
-36
lines changed

cartographer_ws/.devcontainer/postCreateCommand.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

cartographer_ws/docker/cache/.gazebo/.gitkeep

Whitespace-only changes.

husky_ws/.devcontainer/postCreateCommand.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

husky_ws/docker/cache/.gazebo/.gitkeep

Whitespace-only changes.

kobuki_ws/.devcontainer/postCreateCommand.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

kobuki_ws/docker/cache/.gazebo/.gitkeep

Whitespace-only changes.

orbslam3_ws/.devcontainer/postCreateCommand.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

rtabmap_ws/.devcontainer/postCreateCommand.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

rtabmap_ws/docker/cache/.gazebo/.gitkeep

Whitespace-only changes.

tests/lint_filenames.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@
3434
# Ref: https://docs.docker.com/compose/compose-file/04-version-and-name/#version-top-level-element-optional
3535
raise ValueError(f"`version` should not exist since it's obsolete: '{filename}'")
3636

37+
# Check if all obsolete files do not exist
38+
OBSOLETE_FILES = [
39+
"docker/cache/.gazebo/.gitkeep",
40+
"docker/compose.yml",
41+
"docker/docker-compose.yaml",
42+
"docker/docker-compose.yml",
43+
".devcontainer/postCreateCommand.sh",
44+
]
45+
for filename in OBSOLETE_FILES:
46+
print(f"Checking non-existence of: '{filename}'...")
47+
for workspace_path in glob.glob(f"{repo_dir}/*_ws"):
48+
if os.path.isfile(f"{workspace_path}/{filename}"):
49+
raise ValueError(f"'{filename}' exists in: '{workspace_path}'")
50+
3751
# Check if `master` branch is accidentally used
3852
for filename in glob.glob(f"{repo_dir}/.github/workflows/*.yaml", recursive=True):
3953
print(f"Checking: '{filename[len(repo_dir)+1:]}'...")

vlp_ws/.devcontainer/postCreateCommand.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

vlp_ws/docker/cache/.gazebo/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)