Just a note. I can see that fixing this would be low priority.
IMO these are errors - they make SPM look sloppy.
Versions
[I] Demo> swift --version
swift-driver version: 1.127.15 Apple Swift version 6.2.4 (swiftlang-6.2.4.1.4 clang-1700.6.4.2)
Target: arm64-apple-macosx26.0
> swift package init --version
Swift Package Manager - Swift 6.2.4
Issues with "--help"
### Error: The --help flag should trigger the help screen, even on bad input
> swift package foo --help
error: Unknown subcommand or plugin name ‘foo’
Usage: swift package <options> <subcommand>
See 'package -help' for more information.
### Error: See 'package -help' in the preceding error message is misleading
> package --help
fish: Unknown command. A component of '/Users/po/.local/bin/study/package' is not a directory. Check your $PATH.
Unexpected option recognition
The package init command does not, per its help screen, have a '--traits' option.
The '--traits' option has absolutely nothing to do with the init subcommand.
### Error: SPM should complain about an unrecognized option. "--traits", not
### attempt to process it
> swift package init --traits
error: Missing value for '--traits <traits>'
Help: --traits <traits> Enables the passed traits of the package. Multiple traits can be specified by providing a comma separated list e.g. `--traits Trait1,Trait2`. When enabling specific traits the defaults traits need to explictily enabled as well by passing `defaults` to this command.
Usage: swift package <options> <subcommand>
See 'package -help' for more information.
### Error: Sets up a library without complaining about --traits
> swift package init --traits t1,t2
### Error: `--help` should trigger the help screen even if there are errors in the input
> swift package init --traits --help
error: Missing value for '--traits <traits>'
Help: --traits <traits> Enables the passed traits of the package. Multiple traits can be specified by providing a comma separated list e.g. `--traits Trait1,Trait2`. When enabling specific traits the defaults traits need to explictily enabled as well by passing `defaults` to this command.
Usage: swift package <options> <subcommand>
See 'package -help' for more information.