Skip to content

ScorePriority: fixed error message about invalid CUSIP length.#5563

Merged
buchen merged 1 commit intoportfolio-performance:masterfrom
hporten:truncated_cusip
Mar 13, 2026
Merged

ScorePriority: fixed error message about invalid CUSIP length.#5563
buchen merged 1 commit intoportfolio-performance:masterfrom
hporten:truncated_cusip

Conversation

@hporten
Copy link
Contributor

@hporten hporten commented Mar 12, 2026

1.) Corrected placeholder value for error message
2.) Do what the comment says and reject all lengths other than 9
3.) Fixed typo in comment.

It is questionable to match CUSIPS with "(?.*)" btw. Particularly as the dot also matches whitespace that later has to be dropped with trim() again. \w would be better but without more test cases we have to guess whether it needs to be surrounded with \s.

PS: 1-2 more pull requests for similar checks will follow.

1.) Corrected placeholder value for error message
2.) Do what the comment says and reject all lengths other than 9
3.) Fixed typo in comment.

It is questionable to match CUSIPS with "(?<wkn>.*)" btw. Particularly
as the dot also matches whitespace that later has to be dropped with
trim() again. \w would be better but without more test cases we have
to guess whether it needs to be surrounded with \s.
@hporten
Copy link
Contributor Author

hporten commented Mar 12, 2026

Fwiw: I do not have an account with ScorePriority. I merely ran across this check as part of the review for possible uses of SkippedItem (#5517).

@buchen buchen merged commit 67a02c5 into portfolio-performance:master Mar 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants