You might have noticed I opened a couple of PRs against the ome-model repository and wondered what it was about. Specifically #135 and #136. I’ve been performing some static analysis of the whole codebase in order to look for issues with the code we were unaware of prior to doing some changes for ome-files.
Static analysis shows up many issues within the codebase. Over 15000 issues. The above PRs eliminate just under 10000 of those issues, all of which are pretty straightforward changes with no behavioural impact. While a number remain, this round of fixes removes most of the simple issues and the categories of failures which remain now allow easier identification of the real problems in the codebase. This allowed the identification of #131 – a dataloss bug, #133 – logic errors in handling of numeric types, though would likely not have caused outright dataloss and #134 which was bad practice for exception handling.
Reducing the number of warnings in the codebase will make it easier to identify and fix additional problems, as well as make it easier to see new problems if they are introduced in the future. I hope you will find these worthwhile to apply. It is still possible to reduce the warning count even further, and so it’s likely I’ll have some additional remediation PRs and bugfix PRs to address these.