Skip to content

Commit

Permalink
refactor: Remove obsolete files across all workspaces and add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
j3soon committed Aug 21, 2024
1 parent 7bf287e commit 112fef8
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 36 deletions.
6 changes: 0 additions & 6 deletions cartographer_ws/.devcontainer/postCreateCommand.sh

This file was deleted.

Empty file.
6 changes: 0 additions & 6 deletions husky_ws/.devcontainer/postCreateCommand.sh

This file was deleted.

Empty file.
6 changes: 0 additions & 6 deletions kobuki_ws/.devcontainer/postCreateCommand.sh

This file was deleted.

Empty file.
6 changes: 0 additions & 6 deletions orbslam3_ws/.devcontainer/postCreateCommand.sh

This file was deleted.

6 changes: 0 additions & 6 deletions rtabmap_ws/.devcontainer/postCreateCommand.sh

This file was deleted.

Empty file.
14 changes: 14 additions & 0 deletions tests/lint_filenames.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,20 @@
# Ref: https://docs.docker.com/compose/compose-file/04-version-and-name/#version-top-level-element-optional
raise ValueError(f"`version` should not exist since it's obsolete: '{filename}'")

# Check if all obsolete files do not exist
OBSOLETE_FILES = [
"docker/cache/.gazebo/.gitkeep",
"docker/compose.yml",
"docker/docker-compose.yaml",
"docker/docker-compose.yml",
".devcontainer/postCreateCommand.sh",
]
for filename in OBSOLETE_FILES:
print(f"Checking non-existence of: '{filename}'...")
for workspace_path in glob.glob(f"{repo_dir}/*_ws"):
if os.path.isfile(f"{workspace_path}/{filename}"):
raise ValueError(f"'{filename}' exists in: '{workspace_path}'")

# Check if `master` branch is accidentally used
for filename in glob.glob(f"{repo_dir}/.github/workflows/*.yaml", recursive=True):
print(f"Checking: '{filename[len(repo_dir)+1:]}'...")
Expand Down
6 changes: 0 additions & 6 deletions vlp_ws/.devcontainer/postCreateCommand.sh

This file was deleted.

Empty file.

0 comments on commit 112fef8

Please sign in to comment.