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

Check and notify if the file seems to be generated. Fixes #1295.#1425

Merged
ramya-rao-a merged 3 commits intomicrosoft:masterfrom
cheesedosa:master
Dec 31, 2017
Merged

Check and notify if the file seems to be generated. Fixes #1295.#1425
ramya-rao-a merged 3 commits intomicrosoft:masterfrom
cheesedosa:master

Conversation

@cheesedosa
Copy link
Copy Markdown
Contributor

No description provided.

.

    Show a warning notification if the first line of the file matches the regexp: `^// Code generated .* DO NOT EDIT\.$`.
@msftclas
Copy link
Copy Markdown

msftclas commented Dec 25, 2017

CLA assistant check
All CLA requirements met.

src/goCheck.ts Outdated
}

export function notifyIfGeneratedFile(e: vscode.TextDocumentChangeEvent) {
if (e.document.isUntitled) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you can also return if e.document.languageId !== 'go so that we can skip the first line check on non Go files

Copy link
Copy Markdown
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.

Thanks @cheesedosa

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.

3 participants