-
Notifications
You must be signed in to change notification settings - Fork 1
Showcase of uploading SARIF to GH checks #3
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
base: main
Are you sure you want to change the base?
Conversation
@@ -12,6 +12,12 @@ | |||
|
|||
const regex2 = /\d/; | |||
|
|||
const regexBad = /[0-9]/; |
Check failure
Code scanning / ESLint
Improve regexes by making them shorter, consistent, and safer. Error
|
||
console.log(regexBad) | ||
|
||
const regexUnused = /\d/; |
Check failure
Code scanning / ESLint
Disallow unused variables Error
|
||
console.log(regexBad) | ||
|
||
const regexUnused = /\d/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Codacy found a critical Error Prone issue: 'regexUnused' is assigned a value but never used.
The issue identified by the ESLint linter is that the variable regexUnused
is assigned a value but is never used in the code. This can lead to unnecessary memory usage and can be confusing for anyone reading the code, as it suggests that the variable should be used somewhere, but it is not.
To fix this issue, we should remove the unused variable declaration.
const regexUnused = /\d/; | |
// const regexUnused = /\d/; |
This comment was generated by an experimental AI tool.
|
||
console.log(regexBad) | ||
|
||
const regexUnused = /\d/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Codacy found a critical Error Prone issue: 'regexUnused' is assigned a value but never used.
The issue identified by ESLint is that the variable regexUnused
is declared and assigned a value, but it is never used in the code. This is considered an error-prone practice because it indicates that the code contains unnecessary or dead code, which can lead to confusion and maintainability issues.
To fix this issue, you should remove the unused variable. Here is the code suggestion to fix the issue:
const regexUnused = /\d/; | |
// const regexUnused = /\d/; |
By commenting out or removing the declaration of regexUnused
, you eliminate the unused variable, thus resolving the ESLint error.
This comment was generated by an experimental AI tool.
|
||
console.log(regexBad) | ||
|
||
const regexUnused = /\d/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Codacy found a critical Error Prone issue: 'regexUnused' is assigned a value but never used.
The issue with the line const regexUnused = /\d/;
is that the variable regexUnused
is declared and assigned a regular expression, but it is never used in the code. This can lead to unnecessary clutter in the codebase and may confuse other developers who might wonder about the purpose of this unused variable.
To fix this issue, you can simply remove the declaration of regexUnused
, as it serves no purpose in the current code. Here's the single line change to address this:
const regexUnused = /\d/; | |
// const regexUnused = /\d/; |
This comment was generated by an experimental AI tool.
|
||
console.log(regexBad) | ||
|
||
const regexUnused = /\d/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Codacy found a critical Error Prone issue: 'regexUnused' is assigned a value but never used.
The issue with the line const regexUnused = /\d/;
is that the variable regexUnused
is declared and assigned a value, but it is never used in the code. This can lead to unnecessary clutter and confusion, as it suggests that there might be an intended use for this regex that is missing.
To fix this issue, you can simply remove the unused variable declaration. Here is the single line change to address the ESLint warning:
const regexUnused = /\d/; | |
// const regexUnused = /\d/; |
This comment was generated by an experimental AI tool.
|
||
console.log(regexBad) | ||
|
||
const regexUnused = /\d/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Codacy found a critical ErrorProne issue: 'regexUnused' is assigned a value but never used.
The issue indicated by the ESLint linter is that the variable regexUnused
is declared and assigned a value, but it is never used anywhere in the code. This can lead to unnecessary clutter and confusion in the codebase, as it suggests that there may have been an intention to use this regex but it was ultimately left unused.
To fix this issue, you can simply remove the declaration of regexUnused
since it serves no purpose in the current code. Here’s the suggested single line change:
const regexUnused = /\d/; | |
// const regexUnused = /\d/; |
This comment was generated by an experimental AI tool.
|
||
console.log(regexBad) | ||
|
||
const regexUnused = /\d/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Codacy found a critical ErrorProne issue: 'regexUnused' is assigned a value but never used.
The issue is that the variable regexUnused
is declared and assigned a regular expression value, but it is never used in the code. This is considered a code smell, as it indicates that there may be unnecessary or leftover code that does not serve any purpose.
To fix this issue, you can simply remove the unused variable declaration. Here's the single line change to address the ESLint warning:
const regexUnused = /\d/; | |
// const regexUnused = /\d/; |
This comment was generated by an experimental AI tool.
|
||
console.log(regexBad) | ||
|
||
const regexUnused = /\d/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Codacy found a critical ErrorProne issue: 'regexUnused' is assigned a value but never used.
The issue identified by ESLint is that the variable regexUnused
is declared and assigned a regular expression value, but it is never used in the code. This can lead to unnecessary clutter in the codebase, as it suggests that there may have been an intention to use this variable which was not fulfilled.
To address this issue, you can simply remove the unused variable declaration. Here’s the suggested change:
const regexUnused = /\d/; | |
// const regexUnused = /\d/; |
This comment was generated by an experimental AI tool.
|
||
console.log(regexBad) | ||
|
||
const regexUnused = /\d/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Codacy found a critical ErrorProne issue: 'regexUnused' is assigned a value but never used.
The issue is that the variable regexUnused
is declared and assigned a regular expression but is never used in the code. This results in a warning from ESLint indicating that the variable is unnecessary and can be removed to improve code cleanliness.
To fix this issue, you can simply remove the declaration of regexUnused
. Here’s the code suggestion:
const regexUnused = /\d/; | |
// const regexUnused = /\d/; |
This comment was generated by an experimental AI tool.
@@ -12,6 +12,12 @@ | |||
|
|||
const regex2 = /\d/; | |||
|
|||
const regexBad = /[0-9]/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy has a fix for the issue: /[0-9]/ can be optimized to /\d/.
const regexBad = /[0-9]/; | |
const regexBad = /\d/; |
|
||
console.log(regexBad) | ||
|
||
const regexUnused = /\d/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Codacy found a critical ErrorProne issue: 'regexUnused' is assigned a value but never used.
The issue reported by ESLint9 is that the variable regexUnused
is declared and assigned a value, but it is never used anywhere in the code. This can lead to unnecessary code clutter and may indicate that the variable is not needed.
To resolve this issue, you can simply remove the unused variable declaration. Here’s the single line change suggestion:
const regexUnused = /\d/; | |
// const regexUnused = /\d/; |
This comment was generated by an experimental AI tool.
|
||
console.log(regexBad) | ||
|
||
const regexUnused = /\d/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Codacy found a critical ErrorProne issue: 'regexUnused' is assigned a value but never used.
The issue highlighted by ESLint indicates that the variable regexUnused
is declared and assigned a regular expression value, but it is never used anywhere in the code. This can lead to unnecessary code clutter and may confuse other developers who might wonder why the variable exists.
To fix this issue, you can simply remove the declaration of regexUnused
, as it's not being utilized. Here’s the single line change to address the problem:
const regexUnused = /\d/; | |
// const regexUnused = /\d/; |
This comment was generated by an experimental AI tool.
@@ -12,6 +12,12 @@ | |||
|
|||
const regex2 = /\d/; | |||
|
|||
const regexBad = /[0-9]/; | |||
|
|||
console.log(regexBad) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy has a fix for the issue: Insert ;
console.log(regexBad) | |
console.log(regexBad); |
@@ -12,6 +12,12 @@ | |||
|
|||
const regex2 = /\d/; | |||
|
|||
const regexBad = /[0-9]/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy has a fix for the issue: Unexpected character class '[0-9]'. Use '\d' instead.
const regexBad = /[0-9]/; | |
const regexBad = /\d/; |
|
||
console.log(regexBad) | ||
|
||
const regexUnused = /\d/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Codacy found a critical ErrorProne issue: 'regexUnused' is assigned a value but never used.
The issue identified by the ESLint linter is that the variable regexUnused
is defined and assigned a regular expression but is never used in the code. This can lead to unnecessary code clutter, making it harder to maintain and understand.
To fix this issue, you can simply remove the unused variable declaration. Here’s the single line change to address the problem:
const regexUnused = /\d/; | |
// const regexUnused = /\d/; |
This comment was generated by an experimental AI tool.
|
||
console.log(regexBad) | ||
|
||
const regexUnused = /\d/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Codacy found a critical ErrorProne issue: 'regexUnused' is assigned a value but never used.
The issue is that the variable regexUnused
is declared and assigned a regular expression value, but it is never used anywhere in the code. This leads to an unused variable warning from ESLint, indicating that the variable is unnecessary and can be removed or utilized.
To fix the issue, you can simply remove the declaration of regexUnused
. Here’s the code suggestion:
const regexUnused = /\d/; | |
// const regexUnused = /\d/; |
This comment was generated by an experimental AI tool.
|
||
console.log(regexBad) | ||
|
||
const regexUnused = /\d/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Codacy found a critical ErrorProne issue: 'regexUnused' is assigned a value but never used.
The issue identified by ESLint is that the variable regexUnused
is declared and assigned a regular expression value, but it is never used anywhere in the code. This can lead to unnecessary clutter in the codebase and may indicate that the variable was intended to be used but was overlooked.
To fix this issue, you can simply remove the unused variable declaration. Here's the single line change:
const regexUnused = /\d/; | |
// const regexUnused = /\d/; |
This change will eliminate the variable that is not being used, thus resolving the ESLint warning.
This comment was generated by an experimental AI tool.
|
||
console.log(regexBad) | ||
|
||
const regexUnused = /\d/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Codacy found a critical ErrorProne issue: 'regexUnused' is assigned a value but never used.
The issue identified by ESLint indicates that the variable regexUnused
is declared and assigned a value, but it is never used anywhere in the code. This can lead to unnecessary clutter in the codebase and can be confusing for other developers, as it suggests that there might have been an intention to use it.
To resolve this issue, you can simply remove the unused variable declaration. Here's the single line change to fix the issue:
const regexUnused = /\d/; | |
// const regexUnused = /\d/; |
This comment was generated by an experimental AI tool.
|
||
console.log(regexBad) | ||
|
||
const regexUnused = /\d/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Codacy found a critical ErrorProne issue: 'regexUnused' is assigned a value but never used.
The issue identified by ESLint is that the variable regexUnused
is declared and assigned a value, but it is never used anywhere in the code. This can lead to unnecessary clutter in the codebase and may indicate that the variable was intended for use but was forgotten.
To fix this issue, you can simply remove the unused variable declaration. Here’s the suggested change:
const regexUnused = /\d/; | |
// const regexUnused = /\d/; |
This comment was generated by an experimental AI tool.
No description provided.