From cddca05148951aacee1a2d16c7e731a520063c77 Mon Sep 17 00:00:00 2001 From: Samuel Doghor <56834362+samdoghor@users.noreply.github.com> Date: Thu, 30 Nov 2023 18:44:44 +0100 Subject: [PATCH] refac: moved the check for newline in README.md to newlines --- alxcheck/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/alxcheck/main.py b/alxcheck/main.py index ebbe5e5..ac6c0bc 100644 --- a/alxcheck/main.py +++ b/alxcheck/main.py @@ -11,6 +11,8 @@ def main(): sys.exit(1) if not check_file_not_empty("README.md"): print_file_empty("README.md") + if not check_file_ends_with_new_line("README.md"): + print_no_ending_new_line("README.md") for root, dirs, files in os.walk("."): # exclude virtual environment folders for dir in dirs: @@ -24,7 +26,7 @@ def main(): file_path = os.path.join(root, file) if file_path.endswith( (".c", ".py", ".js", ".m", ".h", - ".mjs", ".jsx", ".json", ".md") + ".mjs", ".jsx", ".json") ): if not check_file_ends_with_new_line(file_path): if not is_empty_init_py(file_path):