Presubmit error for bad delimiters
This change introduces a new error for license fields that use any of the following `["/", ";", " and ", " or "]`. I chose to include the offending character/s in the error message because I find it easier to parse error messages that tell me exactly which character is the bad one. Similarly I've included conditions in the reason to handle the plural cases correctly, generating either: `License contains a bad delimiter character ...`, or `License contains bad delimiter characters ...` I realise this means that any downstream rules looking to detect this error will need to check for a common subset, e.g 'bad delimiter character', however I think it's worth it for the improved user experience of receiving the error. I've also anticipated that most of these errors will be due to situations where multiple licenses are offered, and included additional text explaining that only the most permissive of the choices should be included. This will affect 9 dependencies and they need to choose between multiple licenses anyway so it's okay to generate an error and have partybug file bugs. Bug: http://b/374850412 Change-Id: I6eb53a8a3bd541a1801dff133884b719dcdfe04d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6181848 Reviewed-by: Jiewei Qian <qjw@chromium.org> Reviewed-by: Rachael Newitt <renewitt@google.com> Commit-Queue: Jordan Brown <rop@google.com>changes/48/6181848/10
parent
80d1969422
commit
9fbf88b06f
Loading…
Reference in New Issue