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
Sometimes you'll want to use a part of the path the 'from' part of your rule matched and use it in the 'to' part. E.g. when you want to prevent stuff in the same folder to be matched.
To achieve this you'll need to do two things:
In the to of your rule:
Make sure the part of the path you want to be matched is between brackets.
Like so: "^src/([^/]+)/.+"
In the from part of your rule:
You can reference the part matched between brackets by using $1 in path
and pathNot rules. Like so: "pathNot": "^src/$1/.+".
See group matching in the rules guide for a little more information.
🔧 with the introduction of 'matching groups', the ownFolder attribute is deprecated. 'matching groups' offer more flexibility and more straightforward semantics, while they can achieve the same.
🐛 pathNot attributes with scary regular expressions now get flagged as well (path attributes already had this)