Repository navigation
Conversation
When manifest.name is empty, the lint falls back to using it as short_name directly. The Path templates then use short_name[0].upper() and short_name[1:], which raises IndexError on an empty string. Fix by guarding against empty short_name and using a placeholder. Fixes nf-core#4464.
This was referenced Sep 15, 2026
Open
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines
300A
is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When
manifest.nameis empty in the pipeline config,files_existlint falls back to using it asshort_namedirectly. The Path templates then useshort_name[0].upper()andshort_name[1:], which raisesIndexErroron an empty string.Fix
Guard against empty
short_nameand use a placeholder value ("UNNAMED") so that the Path templates don't crash. This prevents the crash and allows the lint to continue running.Testing
short_name = ""→"".split("/")returns[""], soshort_namebecomes"", then"".split("/")[0].upper()raisesIndexError.Fixes #4464