-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix: sonar issues #7812
Fix: sonar issues #7812
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7812 +/- ##
==========================================
- Coverage 59.16% 58.93% -0.23%
==========================================
Files 498 498
Lines 22254 22293 +39
Branches 3578 3575 -3
==========================================
- Hits 13166 13139 -27
- Misses 8264 8332 +68
+ Partials 824 822 -2
Continue to review full report at Codecov.
|
@@ -163,7 +163,7 @@ export class NativeEditorProvider implements INotebookEditorProvider, IAsyncDisp | |||
const existing = await this.fileSystem.search(`${dir}/${localize.DataScience.untitledNotebookFileName()}-*.ipynb`); | |||
|
|||
// Sort by number | |||
const sorted = existing.sort(); | |||
const sorted = [...existing].sort(); |
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.
There's no need to clone the array, you can use the same array as is. I.e. use existing
instead of sorted
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.
I just pushed a commit that should address your suggestion.
@DonJayamanne did you want more changes on this? |
Attempting to address some of the sonar issues noted in #7745.
I do now know any typescript to address the the last few items left.
package-lock.json
has been regenerated by runningnpm install
(if dependencies have changed)