Closed allancanare closed 2 years ago
According to the CocoaPods source, the root name of a pod should not contain a plus sign. This fact is why cyclonedx-cocoapods does the same naming checks.
We could add a comment in our source that links to the CocoaPods source so it is more obvious why those naming checks are being done.
Although my previous statement about the CocoaPods create
name validation is correct, doing some searching on the CocoaPods spec repository shows that there are quite a number of established pods (534 as of this writing) that use the "+" sign in the name. We should probably remove that check in our code because it is not actually enforced by the CocoaPods ecosystem.
The other naming rules are:
Search for starting with a period:
$ pod search --simple --no-pager --regex ^\\..+
[!] Unable to find a pod with name matching `^\..+'
Search for whitespace in the name:
$ pod search --simple --no-pager --regex .\*\\s.\*
-> ID.me WebVerify (2.0.0) [DEPRECATED]
Search for "+" in the name (note that this search took 8 minutes on a MacBook Pro with M1 Max):
$ pod search --simple --no-pager --no-ansi --regex .\*\\+.\* | fgrep -c -e "-> "
534
I get the following error when creating a bom file and one of the libraries has a plus sign in the name, example
pod 'NSDate+TimeAgo'
Is this check necessary? Related code is at pod.rb line 38