Sharing Rules
Validation Rules at the Global scope live in a folder named epmwb-global,
directly under your EPM Workbench Root. That folder holds a single file,
validation-rules.json, and it exists on its own precisely so a team can share
it: turn epmwb-global into a git repository, and everyone’s editor flags the
same things in the same way.
The file is created the first time you click the Global scope’s file link in the Validation Rules panel. Do that first, so there is something to share.
Before you start
Section titled “Before you start”VS Code’s source control features need git installed on your machine.
- Open the Source Control view (
Ctrl+Shift+G/Cmd+Shift+G). - If VS Code tells you git is missing and offers a download link, follow it, install git, then restart VS Code.
- If you see the normal Source Control view instead, git is ready.
VS Code’s own source control documentation covers setup and sign-in in more detail.
Publish the rulebook (first teammate)
Section titled “Publish the rulebook (first teammate)”One person publishes the folder to GitHub. The Source Control view acts on the folder that
is currently open as your window, so open epmwb-global by itself for these
steps.
- File > Open Folder, then pick the
epmwb-globalfolder under your EPM Workbench Root. The window now shows only that folder. - Open the Source Control view (
Ctrl+Shift+G/Cmd+Shift+G). - Click Publish to GitHub. If you see Initialize Repository instead, click that first, then publish.
- Choose the private repository option.
- Sign in to GitHub when VS Code prompts you, and approve the access request in the browser window it opens.
- Go back to your normal workspace with File > Open Recent and pick your EPM Workbench Root.
After that, VS Code notices the repository inside your Root on its own. Your
day-to-day window’s Source Control view lists epmwb-global as its own
repository, so you never need to open it separately again.
Get the rulebook (everyone else)
Section titled “Get the rulebook (everyone else)”- Open the Command Palette (
Ctrl+Shift+P/Cmd+Shift+P) and run Git: Clone. - Paste the repository URL your teammate shares with you.
- When VS Code asks where to put the repository, choose your EPM Workbench
Root. The folder lands at
{Root}/epmwb-global, which is exactly where the extension looks for it. - When VS Code offers to open the cloned folder, choose Add to Workspace or decline and stay in your Root window. Either way the rules take effect.
Day to day
Section titled “Day to day”Nothing changes about how you write rules. The panel is where you add a rule,
set severities per scope, and remove an Exception, and it writes to the same
validation-rules.json. There is no edit or delete button for a custom rule you
already saved: fill in New Rule again under the same id to replace it, or
open the file itself from the panel’s scope link and change it there.
- Open the Source Control view. Changed files appear under the
epmwb-globalrepository. - Type a short message describing the change, for example
require a comment header on every Rule. - Click Commit.
- Click Sync Changes to send your commit to GitHub.
Teammates pick up your changes with Sync Changes as well. Sync before you start a batch of rule edits, the same way you would with any shared file.