Thank you for reaching out on the Redgate forums regarding your code validation request.
Unfortunately, there isn't a way directly through SQL Change Automation to check for code like this.
It may be possible using SQL Test / t-sqlt as a way to do these checks as part of a deployment pipeline.
I had a look at their existing tests but couldn't see one specifically for your requirements however it may be a possibility to create your own custom test
If wanting to investigate this angle further I would suggest the t-sqlt community site - https://groups.google.com/g/tsqlt or stackoverflow page - https://stackoverflow.com/questions/tagged/tsqlt
Tips and how-to guides for Redgate products
Ask, discuss, and solve questions about Redgate's tools
Meet us at an event, get sponsored, and join our Friends of Redgate
In-depth articles and opinion from Redgate's technical journal