diff --git a/nf_core/modules/lint.py b/nf_core/modules/lint.py index 909dd91170..c5dc501a5b 100644 --- a/nf_core/modules/lint.py +++ b/nf_core/modules/lint.py @@ -375,7 +375,6 @@ def check_module_changes(self, nfcore_modules): Downloads the 'main.nf', 'functions.nf' and 'meta.yml' files for every module and compare them to the local copies """ - all_modules_up_to_date = True files_to_check = ["main.nf", "functions.nf", "meta.yml"] progress_bar = rich.progress.Progress( @@ -420,7 +419,6 @@ def check_module_changes(self, nfcore_modules): remote_copy = r.content.decode("utf-8") if local_copy != remote_copy: - all_modules_up_to_date = False self.warned.append( LintResult( mod, @@ -429,6 +427,15 @@ def check_module_changes(self, nfcore_modules): f"{os.path.join(mod.module_dir, f)}", ) ) + else: + self.passed.append( + LintResult( + mod, + "check_local_copy", + "Local copy of module up to date", + f"{os.path.join(mod.module_dir, f)}", + ) + ) except UnicodeDecodeError as e: self.warned.append( LintResult( @@ -439,9 +446,6 @@ def check_module_changes(self, nfcore_modules): ) ) - if all_modules_up_to_date: - self.passed.append("All modules are up to date!") - class NFCoreModule(object): """ diff --git a/tests/test_modules.py b/tests/test_modules.py index 5296270092..b4809dd270 100644 --- a/tests/test_modules.py +++ b/tests/test_modules.py @@ -83,7 +83,7 @@ def test_modules_lint_fastqc(self): self.mods.install("fastqc") module_lint = nf_core.modules.ModuleLint(dir=self.pipeline_dir) module_lint.lint(print_results=False, all_modules=True) - assert len(module_lint.passed) == 16 + assert len(module_lint.passed) == 18 assert len(module_lint.warned) == 0 assert len(module_lint.failed) == 0