Skip to content

Adding configuration variable replacement in c_cpp_properties.json.#1529

Merged
bobbrow merged 3 commits into
microsoft:masterfrom
thejcannon:config_replacement
Feb 7, 2018
Merged

Adding configuration variable replacement in c_cpp_properties.json.#1529
bobbrow merged 3 commits into
microsoft:masterfrom
thejcannon:config_replacement

Conversation

@thejcannon

Copy link
Copy Markdown
Contributor

As requested in issue #314 in addition to "env.ENV_VAR", "env:ENV_VAR" and just "ENV_VAR", adding support for "config:config_variable" and "config.config_variable".

@msftclas

msftclas commented Feb 7, 2018

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

Comment thread Extension/src/common.ts Outdated
let ret: string = input.replace(regexp, (match: string, ignored1: string, varType: string, ignored2: string, name: string) => {
// Historically, if the variable didn't have anything before the "." or ":"
// it was assumed to be an environment variable
if (varType === undefined) { varType = "env"; }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

varType = "env"; } [](start = 37, length = 18)

I believe our linting rules require the body of the if to be on a new line.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I ran TSLint and got "vscode-tslint: Status is OK" (It did find some other lint issues though).
Happy to move it to new line, though!

@bobbrow bobbrow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

:shipit:

@bobbrow

bobbrow commented Feb 7, 2018

Copy link
Copy Markdown
Member

@thejcannon, I'm ready to accept this pull request. You just need to sign the CLA if you haven't already then I can click the button.

Thanks for the help!

@thejcannon

Copy link
Copy Markdown
Contributor Author

@bobbrow Just waiting on approval from my employer.

@thejcannon

Copy link
Copy Markdown
Contributor Author

@bobbrow done!

@bobbrow bobbrow merged commit d5af9a1 into microsoft:master Feb 7, 2018
@bobbrow

bobbrow commented Feb 7, 2018

Copy link
Copy Markdown
Member

Awesome. Thanks again!

@thejcannon thejcannon deleted the config_replacement branch February 7, 2018 18:50
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 16, 2020
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