-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding configuration variable replacement in c_cpp_properties.json. #1529
Conversation
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"; } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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! |
@bobbrow Just waiting on approval from my employer. |
@bobbrow done! |
Awesome. Thanks again! |
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".