Skip to content
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

chore: align repo conventions #350

Merged
merged 5 commits into from
Feb 5, 2025
Merged

chore: align repo conventions #350

merged 5 commits into from
Feb 5, 2025

Conversation

ryanfoxtyler
Copy link
Member

No description provided.

Copy link

vercel bot commented Feb 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ratel ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 5, 2025 10:09pm

function isTemplateAnnotation(str) {
return (
str.indexOf("{{") === 0 &&
str.lastIndexOf("}}") === str.length - 2

Check failure

Code scanning / CodeQL

Incorrect suffix check High

This suffix check is missing a length comparison to correctly handle lastIndexOf returning -1.

Copilot Autofix AI 5 days ago

To fix the problem, we need to explicitly check if lastIndexOf returns -1 before comparing it to str.length - 2. This ensures that the function correctly identifies when the substring "}}" is not found in str.

  • Modify the isTemplateAnnotation function to include a check for lastIndexOf returning -1.
  • Update the condition to ensure it only returns true if the substring "}}" is found at the correct position.
Suggested changeset 1
client/public/index.html

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/client/public/index.html b/client/public/index.html
--- a/client/public/index.html
+++ b/client/public/index.html
@@ -30,2 +30,3 @@
                     str.indexOf("{{") === 0 &&
+                    str.lastIndexOf("}}") !== -1 &&
                     str.lastIndexOf("}}") === str.length - 2
EOF
@@ -30,2 +30,3 @@
str.indexOf("{{") === 0 &&
str.lastIndexOf("}}") !== -1 &&
str.lastIndexOf("}}") === str.length - 2
Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
@ryanfoxtyler ryanfoxtyler marked this pull request as ready for review February 5, 2025 22:06
@ryanfoxtyler ryanfoxtyler merged commit 4fa908b into main Feb 5, 2025
5 of 6 checks passed
@ryanfoxtyler ryanfoxtyler deleted the ryan/repo-alignment branch February 5, 2025 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant