Skip to content

Commit

Permalink
only get component version when linting a pipeline repo
Browse files Browse the repository at this point in the history
  • Loading branch information
mirpedrol committed May 6, 2024
1 parent 83d1f1d commit f69fe30
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions nf_core/modules/lint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,10 @@ def lint_module(self, mod, progress_bar, registry, local=False, fix_version=Fals

# Otherwise run all the lint tests
else:
# Set correct sha
version = self.modules_json.get_module_version(mod.component_name, mod.repo_url, mod.org)
mod.git_sha = version
if self.repo_type == "pipeline":
# Set correct sha
version = self.modules_json.get_module_version(mod.component_name, mod.repo_url, mod.org)
mod.git_sha = version

for test_name in self.lint_tests:
if test_name == "main_nf":
Expand Down
7 changes: 4 additions & 3 deletions nf_core/subworkflows/lint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,10 @@ def lint_subworkflow(self, swf, progress_bar, registry, local=False):

# Otherwise run all the lint tests
else:
# Set correct sha
version = self.modules_json.get_subworkflow_version(swf.component_name, swf.repo_url, swf.org)
swf.git_sha = version
if self.repo_type == "pipeline":
# Set correct sha
version = self.modules_json.get_subworkflow_version(swf.component_name, swf.repo_url, swf.org)
swf.git_sha = version

for test_name in self.lint_tests:
getattr(self, test_name)(swf)
Expand Down

0 comments on commit f69fe30

Please sign in to comment.