If anyone is aware of a tool or an approach or a discussion about Package.swift file validation in terms of being parseable, please let me know about it.
The only solution I could find so far is to run
swift package dump-package
If the package is not parseable, an error will be shown.
Is there a better way or a designated tool?