Skip to content

Sharing Lint Rules

Your Global Lint Rules are kept in one file, lint-rules.json, in a folder named epmwb-global in your EPM Workbench Root. That folder is kept apart so a team can share it. Put it in a git repository, and everyone’s editor flags the same things in the same way.

Everyone who shares the Lint Rules needs a free GitHub account, and git on their computer. VS Code’s source control features use git.

  1. Open the Source Control view (Ctrl+Shift+G, or Cmd+Shift+G on a Mac).
  2. If VS Code says git is missing and offers a download link, follow it, install git, and restart VS Code.
  3. 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.

The file is created the first time you save something at the Global scope. In the Lint Rules panel, write a Lint Rule and set its Scope to Global, then click Save rule.

You can also create the file yourself: make a folder named epmwb-global in your EPM Workbench Root, and a file in it named lint-rules.json. See Edit lint-rules.json by hand for what goes in it.

Only the Global file is shared this way. Level changes made with the Error, Warning, Info, and Off buttons are saved for one Pod, and Lint Exceptions are saved in the Pod Folder, so neither reaches your team. To share a level, add it to the Global file’s configure section, for example "calc/all-dimensions-accounted": "off".

One person publishes the folder to GitHub. The Source Control view works on the folder open in the window, so open epmwb-global by itself for these steps.

  1. Choose File > Open Folder and pick the epmwb-global folder in your EPM Workbench Root. The window now shows only that folder.
  2. Open the Source Control view.
  3. Click Publish to GitHub. If you see Initialize Repository instead, click that first, then publish. Keep the name epmwb-global.
  4. Choose the private repository option.
  5. Sign in to GitHub when VS Code asks, and approve the request in the browser window it opens.
  6. On GitHub, open the new repository, go to Settings > Collaborators, and invite each teammate. They need to accept before they can get the files.
  7. Go back to your usual window with File > Open Recent, and pick your EPM Workbench Root.

From then on, VS Code finds the repository on its own. Your usual window’s Source Control view lists epmwb-global as a repository of its own.

  1. Open the Command Palette (Ctrl+Shift+P, or Cmd+Shift+P on a Mac) and run Git: Clone.
  2. Paste the repository address your teammate sends you.
  3. When VS Code asks where to put it, choose your EPM Workbench Root. The folder lands at epmwb-global in your Root, which is where EPM Workbench looks for it.
  4. When VS Code offers to open the cloned folder, choose Add to Workspace, or say no and stay in your usual window. Either way, the Lint Rules apply.

Change Lint Rules the same way as before, in the panel or in the file. Then send the change to your team:

  1. Open the Source Control view. Changed files show under the epmwb-global repository.
  2. Type a short message that says what changed, for example turn off calc/all-dimensions-accounted.
  3. Click Commit.
  4. Click Sync Changes to send it to GitHub.

Teammates get your changes with Sync Changes too. Sync before you start changing Lint Rules, as with any shared file. If someone else changed the same lines in the meantime, VS Code shows both versions and asks you which to keep.

Changes apply as soon as the file changes, so a change you sync in takes effect without restarting VS Code.