Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

make browse.path optional#2135

Merged
bobbrow merged 1 commit into
mastermicrosoft/vscode-cpptools:masterfrom
bobbrow/optionalBrowsePathmicrosoft/vscode-cpptools:bobbrow/optionalBrowsePathCopy head branch name to clipboard
Jun 15, 2018
Merged

make browse.path optional#2135
bobbrow merged 1 commit into
mastermicrosoft/vscode-cpptools:masterfrom
bobbrow/optionalBrowsePathmicrosoft/vscode-cpptools:bobbrow/optionalBrowsePathCopy head branch name to clipboard

Conversation

@bobbrow

@bobbrow bobbrow commented Jun 15, 2018

Copy link
Copy Markdown
Member

No description provided.

@bobbrow bobbrow requested a review from sean-mcmanus June 15, 2018 17:18
// If the user doesn't set browse.path, copy the includePath over. Make sure ${workspaceFolder} is in there though...
configuration.browse.path = configuration.includePath.slice(0);
if (-1 === configuration.includePath.findIndex((value: string, index: number) => {
return !!value.match(/^\$\{(workspaceRoot|workspaceFolder)\}(\\|\\\*\*|\/|\/\*\*)?$/g);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why !!?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh, value.match return null if it's not found, so !null == true, and !true is false...maybe using != null would be less confusing?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

i didn't want to check for empty array vs null vs undefined

@bobbrow bobbrow merged commit d77470f into master Jun 15, 2018
@bobbrow bobbrow deleted the bobbrow/optionalBrowsePath branch June 15, 2018 23:35
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 14, 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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.