Add buildifier
Json File Configuration
#357
Merged
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.
This PR adds the
buildifierConfigJsonPath
setting, which allows a custom path to be set to pull the json configuration file forbuildifier
(this is often.buildifier.json
). If thebuildifierConfigJsonPath
path is set, whenbuildifier
is run within this extension, the--config <path>
CLI arguments will be passed tobuildifier
.While it could be said that this PR is now adding support for the
.buildifier.json
file -- it's only adding support for the customization of that file path. #350 actually pulled out yet another drive-by fix (of #208) by adding the working directory. In that PR,cwd: vscode.workspace.workspaceFolders?.[0]?.uri?.fsPath
is setting the working directory for thebuildifier
execution to be the local workspace. This means any local.buildifier.json
file will automatically get pulled in and used. This PR is allowing further customization on top of that.The logic of this PR was tested by manually editing the js of my local extension installation with the equivalent changes (that's how I found that
cwd: ...
ended up working with a local.buildifier.json
).BEGIN_COMMIT_OVERRIDE
feat: Add buildifier Json File Configuration (#357)
END_COMMIT_OVERRIDE