microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.54k stars 1.56k forks source link

Fix matching of editorConfig sections patterns #12953

Closed Colengms closed 1 week ago

Colengms commented 1 week ago

Fixes: https://github.com/microsoft/vscode-cpptools/issues/12933

To resolve: https://github.com/microsoft/vscode-cpptools/issues/12529 ... we had avoided use of the editorConfig module (which pulled in oneini, which is where the dependency on wasm was coming from). However, my implementation of pattern matching against editorConfig section patterns was too simplistic.

This PR uses minimatch, and code copied directly from: https://github.com/editorconfig/editorconfig-core-js

I also reported the WebAssembly issue in the repo for the editorConfig module: https://github.com/editorconfig/editorconfig-core-js/issues/128

Ideally, if not for the issue with WebAssembly, we should be using the editorConfig module. If that issue gets fixed, we should probably switch back.