Skip to content

Commit a20db27

Browse files
Merge #511
511: Alphanumeric name check: Don't use `\w`, because we don't want to include underscores r=DilumAluthge a=DilumAluthge This is a bug-fix. This guideline was always intended to exclude non-alphanumeric characters; we just weren't doing that correctly. Co-authored-by: Dilum Aluthge <[email protected]>
2 parents 63a13b6 + b980b13 commit a20db27

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "RegistryCI"
22
uuid = "0c95cc5f-2f7e-43fe-82dd-79dbcba86b32"
33
authors = ["Dilum Aluthge <[email protected]>", "Fredrik Ekre <[email protected]>", "contributors"]
4-
version = "8.4.0"
4+
version = "8.4.1"
55

66
[deps]
77
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

src/AutoMerge/guidelines.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,10 @@ const guideline_normal_capitalization = Guideline(;
384384
)
385385

386386
function meets_normal_capitalization(pkg)
387-
meets_this_guideline = occursin(r"^[A-Z]\w*[a-z]\w*[0-9]?$", pkg)
387+
# We intentionally do not use `\w` in this regex.
388+
# `\w` includes underscores, but we don't want to include underscores.
389+
# So, instead of `\w`, we use `[A-Za-z0-9]`.
390+
meets_this_guideline = occursin(r"^[A-Z][A-Za-z0-9]*[a-z][A-Za-z0-9]*[0-9]?$", pkg)
388391
if meets_this_guideline
389392
return true, ""
390393
else

0 commit comments

Comments
 (0)