From 7be58676758fe265ed8a3873f9f74e9a86414b46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Verg=C3=A9?= Date: Mon, 27 Jun 2016 21:45:21 +0200 Subject: [PATCH] linter: Remove dead code There is *always* a `Line` element at the end of file, even if the newline character (`\n`) is missing. --- yamllint/linter.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/yamllint/linter.py b/yamllint/linter.py index 9b55b29..358d5f8 100644 --- a/yamllint/linter.py +++ b/yamllint/linter.py @@ -157,12 +157,6 @@ def get_costemic_problems(buffer, conf): disabled_for_next_line = DisableLineDirective() cache = [] - # If no new line at the end of file, the cache is not empty - for problem in cache: - if not (disabled_for_line.is_disabled_by_directive(problem) or - disabled.is_disabled_by_directive(problem)): - yield problem - def get_syntax_error(buffer): try: