-
Notifications
You must be signed in to change notification settings - Fork 115
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
[refactor] cleanup warnings #984
base: main
Are you sure you want to change the base?
Conversation
`\\s*public\\s*(entry\\s*)?fun\\s*${escapeRegExp( | ||
functionName, | ||
)}\\s*(?:<|\\()`, | ||
`\s*public\s*(entry\s*)?fun\s*${escapeRegExp(functionName)}\s*[<(]`, |
Check failure
Code scanning / CodeQL
Useless regular-expression character escape High
regular expression
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 15 days ago
To fix the problem, we need to ensure that the escape sequence \s
is correctly interpreted as a whitespace character in the regular expression. This can be achieved by adding an extra backslash to escape the backslash itself in the string literal. This way, the regular expression will correctly interpret \\s
as \s
.
- Update the regular expression pattern on line 137 to use double backslashes for the
\s
escape sequence. - No additional methods, imports, or definitions are needed to implement this change.
-
Copy modified line R137
@@ -136,3 +136,3 @@ | ||
const publicEntryFunRegexp = new RegExp( | ||
`\s*public\s*(entry\s*)?fun\s*${escapeRegExp(functionName)}\s*[<(]`, | ||
`\\s*public\\s*(entry\\s*)?fun\\s*${escapeRegExp(functionName)}\\s*[<(]`, | ||
); |
`\\s*public\\s*(entry\\s*)?fun\\s*${escapeRegExp( | ||
functionName, | ||
)}\\s*(?:<|\\()`, | ||
`\s*public\s*(entry\s*)?fun\s*${escapeRegExp(functionName)}\s*[<(]`, |
Check failure
Code scanning / CodeQL
Useless regular-expression character escape High
regular expression
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 15 days ago
To fix the problem, we need to ensure that the escape sequence \s
is correctly interpreted as a whitespace character in the regular expression. This can be achieved by adding an extra backslash to escape the backslash itself in the string literal. This way, the regular expression will correctly interpret \\s
as \s
.
- Update the regular expression pattern on line 137 to use double backslashes for the
\s
escape sequence. - No additional methods, imports, or definitions are needed to implement this change.
-
Copy modified line R137
@@ -136,3 +136,3 @@ | ||
const publicEntryFunRegexp = new RegExp( | ||
`\s*public\s*(entry\s*)?fun\s*${escapeRegExp(functionName)}\s*[<(]`, | ||
`\\s*public\\s*(entry\\s*)?fun\\s*${escapeRegExp(functionName)}\\s*[<(]`, | ||
); |
`\\s*public\\s*(entry\\s*)?fun\\s*${escapeRegExp( | ||
functionName, | ||
)}\\s*(?:<|\\()`, | ||
`\s*public\s*(entry\s*)?fun\s*${escapeRegExp(functionName)}\s*[<(]`, |
Check failure
Code scanning / CodeQL
Useless regular-expression character escape High
regular expression
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 15 days ago
To fix the problem, we need to ensure that the escape sequence \s
is correctly interpreted as a whitespace character in the regular expression. This can be achieved by using double backslashes \\s
in the string literal, which will be correctly interpreted as \s
in the resulting regular expression.
- Change the escape sequence
\s
to\\s
in the string literal used to create the regular expression. - This change should be made on line 137 in the file
src/utils.ts
.
-
Copy modified line R137
@@ -136,3 +136,3 @@ | ||
const publicEntryFunRegexp = new RegExp( | ||
`\s*public\s*(entry\s*)?fun\s*${escapeRegExp(functionName)}\s*[<(]`, | ||
`\\s*public\\s*(entry\\s*)?fun\\s*${escapeRegExp(functionName)}\\s*[<(]`, | ||
); |
`\\s*public\\s*(entry\\s*)?fun\\s*${escapeRegExp( | ||
functionName, | ||
)}\\s*(?:<|\\()`, | ||
`\s*public\s*(entry\s*)?fun\s*${escapeRegExp(functionName)}\s*[<(]`, |
Check failure
Code scanning / CodeQL
Useless regular-expression character escape High
regular expression
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 15 days ago
To fix the problem, we need to ensure that the escape sequence \s
is correctly interpreted as a whitespace character in the regular expression. This can be achieved by adding an extra backslash to escape the backslash itself in the string literal. This way, the regular expression will correctly interpret \\s
as \s
.
- Update the regular expression pattern on line 137 to use double backslashes for the
\s
escape sequence. - No additional methods, imports, or definitions are needed to implement this change.
-
Copy modified line R137
@@ -136,3 +136,3 @@ | ||
const publicEntryFunRegexp = new RegExp( | ||
`\s*public\s*(entry\s*)?fun\s*${escapeRegExp(functionName)}\s*[<(]`, | ||
`\\s*public\\s*(entry\\s*)?fun\\s*${escapeRegExp(functionName)}\\s*[<(]`, | ||
); |
`\\s*public\\s*(entry\\s*)?fun\\s*${escapeRegExp( | ||
functionName, | ||
)}\\s*(?:<|\\()`, | ||
`\s*public\s*(entry\s*)?fun\s*${escapeRegExp(functionName)}\s*[<(]`, |
Check failure
Code scanning / CodeQL
Useless regular-expression character escape High
regular expression
This autofix suggestion was applied.
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 14 days ago
To fix the problem, we need to ensure that the \s
escape sequence is correctly interpreted as a whitespace character in the regular expression. This can be achieved by adding an extra backslash to escape the backslash itself in the string literal. This way, the regular expression will correctly interpret \\s
as \s
.
- Change the string literal to use double backslashes for the
\s
escape sequence. - Specifically, update line 137 in the file
src/utils.ts
to use\\s
instead of\s
.
-
Copy modified line R137
@@ -136,3 +136,3 @@ | ||
const publicEntryFunRegexp = new RegExp( | ||
`\s*public\s*(entry\s*)?fun\s*${escapeRegExp(functionName)}\s*[<(]`, | ||
`\\s*public\\s*(entry\\s*)?fun\\s*${escapeRegExp(functionName)}\\s*[<(]`, | ||
); |
✅ Deploy Preview for aptos-explorer ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
5db5f87
to
2e5f5c3
Compare
Description
Cleans up some more warnings for lints
Related Links
Checklist