You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After looking at the machine generated accelerator.yaml file in a bit more detail, I think the following recipes could be used to make it more "natural" (and concise):
All of the preprocessor #if x #endif directives could be replaced by a ReplaceText with regex, e.g. like so:
but then of course, there is no need to have this snippet per file, so the include can become
- include: ['**/*.csproj', '**/*.xml']
and handle all files in one swoop.
You're then left with one snippet per option + comment format (xml-like, C-like, etc.)
I believe this can apply to lines 70 to 800 and scale with the number of options instead of the number of files to touch.
If you're adventurous, this could be reduced to one snippet per option if you make the regex cope with all comment styles.
After looking at the machine generated
accelerator.yaml
file in a bit more detail, I think the following recipes could be used to make it more "natural" (and concise):#if x #endif
directives could be replaced by aReplaceText
withregex
, e.g. like so:becomes
but then of course, there is no need to have this snippet per file, so the include can become
and handle all files in one swoop.
You're then left with one snippet per option + comment format (xml-like, C-like, etc.)
I believe this can apply to lines 70 to 800 and scale with the number of options instead of the number of files to touch.
If you're adventurous, this could be reduced to one snippet per option if you make the regex cope with all comment styles.
RewritePath
of the formcan be rewritten to a couple of
RewritePath
using capturing groups:The text was updated successfully, but these errors were encountered: