Skip to content

Change error message displayed when path to a tool is invalid #1903

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

Merged
merged 6 commits into from
Jun 12, 2018

Conversation

DonJayamanne
Copy link

Fixes #1064

This pull request:

  • Has a title summarizes what is changing
  • Includes a news entry file (remember to thank yourself!)
  • Has unit tests & code coverage is not adversely affected (within reason)
  • Works on all actively maintained versions of Python (e.g. Python 2.7 & the latest Python 3 release)
  • Works on Windows 10, macOS, and Linux (e.g. considered file system case-sensitivity)

Copy link

@d3r3kk d3r3kk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall a good change I believe. I left a few comments that you can choose to handle or leave alone (just suggestions).


'use strict';

// tslint:disable:max-classes-per-file
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be so bad to split this into multiple files representing each implementation? (Not a dealbreaker of course, but perhaps a subdir with each implementation might be more understandable).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would've done that, but this is how it was written by Mikhail, hence I left it.
Generally, I'd split it, however if the classes are small, I don't mind having them in one file either.

@@ -50,6 +50,14 @@ export enum InstallerResponse {
Ignore
}

export enum ProductType {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice touch.


'use strict';

// tslint:disable:max-func-body-length no-invalid-this
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary or could we split the case-statement bodies into callable methods that would shorten the body length (and perhaps improve readability?).

Copy link
Author

@DonJayamanne DonJayamanne Jun 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was trying to avoid some tests getting skipped. The down side is that we will have a large number of tests (144 to be precise) that get executed but are skipped.
Here's what we get:
tests

The only way to avoid this is to write a case statement or split each case statement into a separate test suite, which is a lot more work/code.
This is what it looks like today (with the case statement):
temp2

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@codecov
Copy link

codecov bot commented Jun 7, 2018

Codecov Report

Merging #1903 into master will decrease coverage by 0.06%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1903      +/-   ##
=========================================
- Coverage   74.46%   74.4%   -0.07%     
=========================================
  Files         283     285       +2     
  Lines       13287   13356      +69     
  Branches     2387    2390       +3     
=========================================
+ Hits         9894    9937      +43     
- Misses       3259    3280      +21     
- Partials      134     139       +5
Impacted Files Coverage Δ
src/client/common/installer/productInstaller.ts 78.23% <100%> (+0.56%) ⬆️
src/client/common/installer/productPath.ts 100% <100%> (ø)
src/client/common/installer/types.ts 100% <100%> (ø) ⬆️
src/client/common/types.ts 100% <100%> (ø) ⬆️
src/client/common/installer/productService.ts 100% <100%> (ø)
src/client/common/installer/serviceRegistry.ts 100% <100%> (ø) ⬆️
src/client/formatters/blackFormatter.ts 41.66% <0%> (-41.67%) ⬇️
src/client/common/logger.ts 26.31% <0%> (-15.79%) ⬇️
src/client/debugger/PythonProcess.ts 45.83% <0%> (-5.42%) ⬇️
src/client/providers/signatureProvider.ts 80.35% <0%> (-5.36%) ⬇️
... and 6 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 7c6c81e...d4cde31. Read the comment docs.

@DonJayamanne DonJayamanne force-pushed the issue1064LinterPath branch from 2dc3b89 to d4cde31 Compare June 12, 2018 16:24
@DonJayamanne DonJayamanne merged commit 1c88366 into microsoft:master Jun 12, 2018
@DonJayamanne DonJayamanne deleted the issue1064LinterPath branch June 20, 2018 03:13
@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 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.

Linter issues
2 participants