Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Make generated file edit warning optional #1537

Merged
merged 4 commits into from
Mar 4, 2018

Conversation

lggomez
Copy link
Contributor

@lggomez lggomez commented Feb 23, 2018

Fixes #1499
To achieve this we include the property ignoreGeneratedCodeWarning on the workspace level settings, and a "Don't Show Again" option on the warning message

@msftclas
Copy link

msftclas commented Feb 23, 2018

CLA assistant check
All CLA requirements met.

@lggomezml
Copy link

lggomezml commented Feb 23, 2018

I've got these tests failing which come from master (I branched from 9b6dd0b):

2 failing
console.pub.js:42
  1) Go Extension Tests
console.pub.js:42
       Gometalinter error checking:
     TypeError: Cannot read property 'line' of undefined
      at util_1.getGoVersion.then.goCheck_1.check.then.diagnostics (/Users/lgomez/DEV/GITHUB/vscode-go/test/go.test.ts:392:39)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:109:7)
  2) Go Extension Tests
console.pub.js:42
       Test Linter for Package:
     TypeError: Cannot read property 'msg' of undefined
      at util_1.getGoVersion.then.goLint_1.goLint.then.diagnostics (/Users/lgomez/DEV/GITHUB/vscode-go/test/go.test.ts:868:33)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:109:7)

I will merge back as soon as master gets stable (fixed in #1538)

Copy link
Contributor

@ramya-rao-a ramya-rao-a left a comment

Choose a reason for hiding this comment

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

We already in a state where we have way too many settings. Adding another when there are other ways to do this is not preferable.

Instead, you can use the local storage to store the user choice of not to show the warning again. See https://github.com/Microsoft/vscode-go/blob/0.6.77/src/goMain.ts#L89 on how to update and https://github.com/Microsoft/vscode-go/blob/0.6.77/src/goMain.ts#L78 on how to read from the local storage. In the linked example, we update/read the Go version

@ramya-rao-a ramya-rao-a merged commit c2fa007 into microsoft:master Mar 4, 2018
@ramya-rao-a
Copy link
Contributor

Thanks!

@ramya-rao-a
Copy link
Contributor

@lggomez This feature is now available in the latest update (0.6.78) to the Go extension. Thanks for the PR!

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.

4 participants