Skip to content
This repository has been 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
merged 3 commits into from
Dec 31, 2017

Conversation

cheesedosa
Copy link
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

msftclas commented Dec 25, 2017

CLA assistant check
All CLA requirements met.

src/goCheck.ts Outdated
@@ -28,6 +28,16 @@ export function removeTestStatus(e: vscode.TextDocumentChangeEvent) {
statusBarItem.text = '';
}

export function notifyIfGeneratedFile(e: vscode.TextDocumentChangeEvent) {
if (e.document.isUntitled) {
Copy link
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
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