Adding configuration variable replacement in c_cpp_properties.json.#1529
Merged
Conversation
bobbrow
reviewed
Feb 7, 2018
| 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"; } |
Member
There was a problem hiding this comment.
varType = "env"; } [](start = 37, length = 18)
I believe our linting rules require the body of the if to be on a new line.
Contributor
Author
There was a problem hiding this comment.
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!
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! |
Contributor
Author
|
@bobbrow Just waiting on approval from my employer. |
Contributor
Author
|
@bobbrow done! |
Member
|
Awesome. Thanks again! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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".