问题描述
我希望我团队中的所有开发人员都使用相同的默认代码样式设置。我们都使用IntelliJ 11+作为我们的IDE,我们使用git作为源控制系统。
I would like all developers on my team to use the same default code style settings. We all use IntelliJ 11+ as our IDE and we use git as our source control system.
确保它们全部使用相同设置的最简单方法是什么?我认为有一种方法可以将样式设置检入项目并让他们的编辑自动发现它们,但情况似乎并非如此。
What is the easiest way to make sure they're all using the same settings? I thought there would be a way to check in the style settings into the project and have their editors discover them automatically, but that doesn't seem to be the case.
PS。我不介意开发人员是否有意识地使用他们自己的偏好覆盖某些默认设置,但我确实希望我们至少从一组常见的默认设置开始。
PS. I don't mind if developers consciously override some of the default settings with their own preferences, but I do want to make sure that we all at least start from a common set of default settings.
推荐答案
代码样式可以是并保存在 .idea / codeStyleSettings.xml
中:
Code Style can be copied to project and saved in .idea/codeStyleSettings.xml
to be shared via version control:
这篇关于如何在IntelliJ中的开发人员之间共享代码样式设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!