-
-
Notifications
You must be signed in to change notification settings - Fork 276
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
Add support for .net global tool configs #807
Conversation
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.
Just one small thing, sorry
} | ||
|
||
export function jsonRegExSingleKeyValue(key, value) { | ||
return regexBuilder(key, value, true, false); |
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.
Personally I would prefer adding another argument to jsonRegExKeyValue
instead of introducing another function. Basically how it was until 93d8516#diff-b0829a6c903b7a1200ba3d8cfbf4f331
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.
That's actually the exact setup I had but I switched to this thinking it'd be easier to maintain. Now it makes sense as to why there's unit tests with a 3rd parameter for those functions even though they only have 2.
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.
Up to you, I see value in both approaches ... at the end it doesn't really matter 😉
Regarding the tests, in #774 I had to change quite a lot so it sneaked through ... sorry for the confusion
c643e7d
to
4211e68
Compare
While testing this I noticed that it's turning the
|
The RegExp builder returns the follow RegExp
After applying the RegExp the resolver gets called with We could add a conditional to prevent this but maybe not worth adding unnecessary complexity since it's not a real issue. What do you think? |
I can live with it if it's just in the test files. No need to over complicate things for an edge case. |
Checklist:
Sample files
The changes to the regex builder are needed to allow turning off the
g
flag because some tools have commands of the same name, such as in the second link, and both instances ofdotnet-format
were being linkified.