Skip to content

Commit

Permalink
Merge pull request #2676 from mirpedrol/lint-environment
Browse files Browse the repository at this point in the history
Linting: environment.yml name must be lowercase
  • Loading branch information
mirpedrol authored Jan 24, 2024
2 parents 31c61ca + aae4801 commit b0eb8d2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

### Linting

- environment.yml name must be lowercase ([#2676](https://github.com/nf-core/tools/pull/2676))

### Modules

- Fix linting of a pipeline with patched custom module ([#2669](https://github.com/nf-core/tools/pull/2669))
Expand Down
18 changes: 18 additions & 0 deletions nf_core/modules/lint/environment_yml.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,21 @@ def environment_yml(module_lint_object: ComponentLint, module: NFCoreComponent)
module.environment_yml,
)
)

# Check that the name is lowercase
if env_yml["name"] == env_yml["name"].lower():
module.passed.append(
(
"environment_yml_name_lowercase",
"The module's `environment.yml` name is lowercase",
module.environment_yml,
)
)
else:
module.failed.append(
(
"environment_yml_name_lowercase",
"The module's `environment.yml` name is not lowercase",
module.environment_yml,
)
)

0 comments on commit b0eb8d2

Please sign in to comment.