Skip to content

detect c/c++ source files when running a build a task#8095

Merged
elahehrashedi merged 4 commits intomainfrom
elrashed/checkSource
Sep 7, 2021
Merged

detect c/c++ source files when running a build a task#8095
elahehrashedi merged 4 commits intomainfrom
elrashed/checkSource

Conversation

@elahehrashedi
Copy link
Contributor

bug fix: #7892

Which error message would you prefer to see?
image

@bobbrow
Copy link
Member

bobbrow commented Sep 2, 2021

Which error message would you prefer to see?

If it works to just put it in the Terminal window, I think that's better than having a separate popup for it.

@elahehrashedi elahehrashedi merged commit f26f88b into main Sep 7, 2021
@bobbrow bobbrow deleted the elrashed/checkSource branch September 7, 2021 16:58
if (editor && !util.fileIsCOrCppSource(editor.document.fileName)) {
this.writeEmitter.fire(localize("cannot.build.non.cpp", 'Cannot build and debug because the active file is not a C or C++ source file.') + this.endOfLine);
this.closeEmitter.fire(-1);
return Promise.resolve();
Copy link
Member

Choose a reason for hiding this comment

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

This function is async so it should just return; There is no need to call Promise.resolve()

@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2021
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.

cppbuild tasks should be able to detect the current file is not a source file

3 participants