Copilot commented on code in PR #12536:
URL: https://github.com/apache/apisix/pull/12536#discussion_r2287351146


##########
apisix/discovery/kubernetes/schema.lua:
##########
@@ -17,7 +17,8 @@
 
 local host_patterns = {
     { pattern = [[^\${[_A-Za-z]([_A-Za-z0-9]*[_A-Za-z])*}$]] },
-    { pattern = 
[[^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$]] },
+    { pattern = [[^[A-Za-z0-9]([-A-Za-z0-9]*[A-Za-z0-9])?]] ..
+                [[(\.[A-Za-z0-9]([-A-Za-z0-9]*[A-Za-z0-9])?)*$]] },

Review Comment:
   [nitpick] The regex pattern is split across multiple lines with string 
concatenation. Consider using a single line or adding comments to explain the 
pattern structure for better readability.
   ```suggestion
       { pattern = 
[[^[A-Za-z0-9]([-A-Za-z0-9]*[A-Za-z0-9])?(\.[A-Za-z0-9]([-A-Za-z0-9]*[A-Za-z0-9])?)*$]]
 },
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to