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

Change how we offer to install/disable linters #973

Merged
merged 122 commits into from
Mar 7, 2018
Merged

Change how we offer to install/disable linters #973

merged 122 commits into from
Mar 7, 2018

Conversation

MikhailArkhipov
Copy link

@MikhailArkhipov MikhailArkhipov commented Mar 7, 2018

Fixes #971

  • Remove confusing 'disable for a session' flag
  • Explicitly offer
    a. Install linter
    b. Disable this linter
    c. Disable all linters

Close button does nothing

image

@codecov
Copy link

codecov bot commented Mar 7, 2018

Codecov Report

Merging #973 into master will increase coverage by 0.25%.
The diff coverage is 40%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #973      +/-   ##
==========================================
+ Coverage   64.01%   64.27%   +0.25%     
==========================================
  Files         260      260              
  Lines       12027    12022       -5     
  Branches     2130     2129       -1     
==========================================
+ Hits         7699     7727      +28     
+ Misses       4319     4286      -33     
  Partials        9        9
Impacted Files Coverage Δ
src/client/linters/types.ts 100% <ø> (ø) ⬆️
src/client/linters/linterManager.ts 82.6% <ø> (+2.34%) ⬆️
src/client/common/installer/productInstaller.ts 66.66% <40%> (+3.62%) ⬆️
src/client/linters/baseLinter.ts 91.66% <0%> (+6.25%) ⬆️
src/client/common/application/applicationShell.ts 30.76% <0%> (+7.69%) ⬆️
src/client/common/logger.ts 53.33% <0%> (+20%) ⬆️
src/client/linters/errorHandlers/errorHandler.ts 100% <0%> (+22.22%) ⬆️
src/client/linters/errorHandlers/notInstalled.ts 94.44% <0%> (+61.11%) ⬆️

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 23b9c38...27fced6. Read the comment docs.

if (response === install) {
return this.install(product, resource);
}
const lm = this.serviceContainer.get<ILinterManager>(ILinterManager);
if (response === disable) {
if (response === disableAllLinting) {
await lm.enableLintingAsync(false);

Choose a reason for hiding this comment

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

Shouldn't the return value from here be InstallerResponse.Disabled?

} else {
lm.disableSessionLinting();
} else if (response === disableThisLinter) {
await lm.getLinterInfo(product).enableAsync(false);

Choose a reason for hiding this comment

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

Shouldn't the return value from here be InstallerResponse.Disabled?

Copy link
Author

Choose a reason for hiding this comment

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

Good idea. Will do.

MikhailArkhipov added 3 commits March 7, 2018 10:54
@MikhailArkhipov MikhailArkhipov merged commit 563f11d into microsoft:master Mar 7, 2018
@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.

Multiple linters not working in VS Code
3 participants