-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DDD links #2429
base: main
Are you sure you want to change the base?
DDD links #2429
Conversation
- DDD == Danny's DNA Discoveries -- project to document all mushrooms species that occur in the Pacific Northwest based on DNA analysis
get(:show, params: { id: name.id }) | ||
|
||
assert_select("div#nomenclature a:match('href',?)", | ||
%r{https://www.alpental.com/psms/ddd/index.htm}, true, |
Check failure
Code scanning / CodeQL
Incomplete regular expression for hostnames High test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI about 1 month ago
To fix the problem, we need to escape the .
characters in the regular expression to ensure that they match literal dots rather than any character. This will make the regex more precise and prevent it from matching unintended URLs.
- Locate the regular expression on line 648 in the file
test/controllers/names_controller_test.rb
. - Modify the regex to escape the
.
characters by replacing each.
with\.
.
-
Copy modified line R648
@@ -647,3 +647,3 @@ | ||
assert_select("div#nomenclature a:match('href',?)", | ||
%r{https://www.alpental.com/psms/ddd/index.htm}, true, | ||
%r{https://www\.alpental\.com/psms/ddd/index\.htm}, true, | ||
"Page is missing a link to PNW cryptonym page") |
get(:show, params: { id: obs.id }) | ||
|
||
assert_select("a:match('href',?)", | ||
%r{https://www.alpental.com/psms/ddd/index.htm}, true, |
Check failure
Code scanning / CodeQL
Incomplete regular expression for hostnames High test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI about 1 month ago
To fix the problem, we need to escape the .
characters in the regular expression to ensure they match literal dots rather than any character. This will make the regex more precise and prevent it from matching unintended URLs.
- Update the regular expression on line 314 to escape the
.
characters. - No additional methods, imports, or definitions are needed.
-
Copy modified line R314
@@ -313,3 +313,3 @@ | ||
assert_select("a:match('href',?)", | ||
%r{https://www.alpental.com/psms/ddd/index.htm}, true, | ||
%r{https://www\.alpental\.com/psms/ddd/index\.htm}, true, | ||
"Page is missing a link to PNW cryptonym page") |
Creates links from relevant Name and Observation pages to an ongoing project to document all PNW mushrooms using DNA analysis. The relevant pages are Names of the form
XXX "xxx-PNW-nnn"
, and Observations whose consensus id takes that form. (DDD = Danny's DNA Discoveries)TODO