mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-28 22:06:31 +00:00
Enforce uppercase README.md and TODO.md filenames
- Renamed all Readme.md → README.md - Renamed all Todo.md → TODO.md - Added integration test (tests/integration/test_filename_conventions.py) to automatically check naming convention. Background: Consistency in file naming (uppercase README.md and TODO.md) avoids issues with case-sensitive filesystems and ensures desktop cards (e.g. Pretix) are properly included. Ref: https://chatgpt.com/share/68b1d135-c688-800f-9441-46a3cbfee175
This commit is contained in:
38 files changed
+27
No files matched your search
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,27 @@
|
||||
import os
|
||||
import unittest
|
||||
|
||||
class TestFilenameConventions(unittest.TestCase):
|
||||
"""
|
||||
Integration test to ensure README.md and TODO.md files
|
||||
are always written in uppercase (README.md / TODO.md).
|
||||
"""
|
||||
|
||||
def test_readme_and_todo_filenames_are_uppercase(self):
|
||||
bad_files = []
|
||||
for root, _, files in os.walk("."):
|
||||
for filename in files:
|
||||
lower = filename.lower()
|
||||
if lower in ("readme.md", "todo.md"):
|
||||
if filename not in ("README.md", "TODO.md"):
|
||||
bad_files.append(os.path.join(root, filename))
|
||||
|
||||
msg = (
|
||||
"The following files violate uppercase naming convention "
|
||||
"(must be README.md or TODO.md):\n- " + "\n- ".join(bad_files)
|
||||
) if bad_files else None
|
||||
|
||||
self.assertEqual(bad_files, [], msg)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user