How to sync settings with my team the right way

Hello,

we would like to sync some settings for our team. At the moment we have an export of the settings and every new developer has to import those at the beginning as base settings. But that's a pain if you want to update some settings for the entire team.

So as a fan of the settings repository, i came across the possibility of the read-only repository. But it seems that it doesn't update all settings. And some settings seem to be only shareable via .idea folder in our repository... so at the moment it looks like a sync-hell and we don't know how PHPStorm loads those settings.

Our "findings":

  1. When we want to share code inspection settings, i guess we have to share .idea/inspectionProfiles to solve path problems
  2. With the settings read-only repositories, we can only share live templates and tools?
  3. It doesn't sync "FORCE_NON_EMPTY_COMMENT" in the personal repository?

How can we share, for example, version control settings, like "FORCE_NON_EMPTY_COMMENT" etc.? We want to enable it by default for everyone as sort of "best practice". The documentation isn't clear about what we can share via the read-only repositories.

 

We are clueless... :)

0
3 comments

Hi there,

Not going to answer the actual question (as I do not use such settings sharing at all) .. but here are few things for you to understand:

  • there are IDE-wide settings that cover whole IDE (affect all projects -- stored at separate IDE-wide folder ( Directories used by the IDE to store settings, caches, plugins and logs ). Live Templates, Keymaps, External Tools etc are such settings. As I understand that's what Settings Repository plugin does (it can sync those settings).
  • Project-specific settings are stored in .idea subfolder in your project root (unless you did some manual manipulation to store it in another place). See How to manage projects under Version Control Systems . Here some settings will be stored in workspace.xml file (which should not be shared as it contains user-specific settings, like recent searches, recently opened files, etc) or in separate config files (when you choose "Shared" option for certain elements, e.g. Scopes, Run Configurations etc -- those that support it)

>FORCE_NON_EMPTY_COMMENT

If this option is set per project (you can turn it on or off separately for each project) ... then it should be stored in .idea subfolder. If it's not stored in dedicated vcs.xml file (or alike, sorry -- cannot provide exact name) then most likely it will be in workspace.xml which should not be shared.

1
Avatar
Permanently deleted user

Thank you for your response.

Good to know how it's meant to be shared - a little bit confusing though. And of course, FORCE_NON_EMPTY_COMMENT is in the workspace.xml :/

So, i guess, we have to write those workspace.xml configs in a wiki article or similar as best practice...

0

>So, i guess, we have to write those workspace.xml configs in a wiki article or similar as best practice...

Well ... for brand new users that just starting to work on the project -- you may create and supply whole .idea folder separately (you may edit workspace.xml and try to remove all user-specific info if desired -- e.g. paths to files etc (in case if you have users on different OS .. or their paths to the tools/files may differ a lot)).

Other than that -- I guess Wiki with screenshots/instructions on how to configure IDE (and not editing workspace.xml directly)

0

Please sign in to leave a comment.