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

Fix: sonar issues #7812

Merged
merged 4 commits into from
Oct 21, 2019
Merged

Fix: sonar issues #7812

merged 4 commits into from
Oct 21, 2019

Conversation

sijis
Copy link

@sijis sijis commented Oct 8, 2019

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.

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR)
  • Title summarizes what is changing
  • Has a news entry file (remember to thank yourself!)
  • Appropriate comments and documentation strings in the code
  • Has sufficient logging.
  • Has telemetry for enhancements.
  • Unit tests & system/integration tests are added/updated
  • Test plan is updated as appropriate
  • package-lock.json has been regenerated by running npm install (if dependencies have changed)
  • The wiki is updated with any design decisions/details.

@msftclas
Copy link

msftclas commented Oct 8, 2019

CLA assistant check
All CLA requirements met.

@codecov-io
Copy link

codecov-io commented Oct 8, 2019

Codecov Report

Merging #7812 into master will decrease coverage by 0.22%.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
src/client/testing/serviceRegistry.ts 48.64% <0%> (-46.85%) ⬇️
src/client/testing/codeLenses/main.ts 44.44% <0%> (-33.34%) ⬇️
...t/datascience/jupyter/jupyterDataRateLimitError.ts 66.66% <0%> (-33.34%) ⬇️
src/client/formatters/serviceRegistry.ts 75% <0%> (-25%) ⬇️
src/client/common/utils/icons.ts 83.33% <0%> (-16.67%) ⬇️
src/client/api.ts 78.57% <0%> (-14.29%) ⬇️
src/client/datascience/cellFactory.ts 75.86% <0%> (-13.8%) ⬇️
src/client/providers/providerUtilities.ts 83.33% <0%> (-5.56%) ⬇️
src/client/common/utils/version.ts 77.77% <0%> (-3.71%) ⬇️
src/client/language/characters.ts 30.76% <0%> (-2.57%) ⬇️
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1536d8b...21395a1. Read the comment docs.

@@ -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();

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

Copy link
Author

@sijis sijis Oct 10, 2019

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.

@rchiodo rchiodo requested a review from DonJayamanne October 14, 2019 21:09
@rchiodo
Copy link

rchiodo commented Oct 17, 2019

@DonJayamanne did you want more changes on this?

@DonJayamanne DonJayamanne merged commit db5cc3b into microsoft:master Oct 21, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants