Rearange code, code cleanup, reformat code sharing and running before git commit.

已回答

Hay,

I want to share Rearange code, code cleanup, reformat code intellij settings for all persons in our company to have the same settings.

Additionally I also want to run this 3 features before git commit for all changed files.

 

How I should do it ?

P.S. I tried to use .editorconfig file but he can't keep information about code rearanging settings.

0

> I want to share Rearrange code, code cleanup, reformat code sharing IntelliJ settings

See https://youtrack.jetbrains.com/issue/IDEA-178045

 

> Additionally I also want to run this 3 features before git commit for all changed files.

Please clarify. The actions are currently executed on all files included into the commit. Do you want a different behavior? Why?

0

@Serge Baranov

But how should I generate this code settings styles directory in my .idea dir because I dont have it by default.

 

@Dmitriy Smirnov
Now I know that I can run some action before and after commit.


So I just need to somehow export my intellij settings releted with that 3 settings, share it (it should be easy bcs we use git), and  automagically import that settings throught intellij.

0

See https://www.jetbrains.com/help/idea/configuring-code-style.html:

> You can copy the IDE scheme to the current project, using the Copy to Project... command.

1

Thanks a lot. Problem solved :)

0

Hey Patryk Janik can you please share how did you manage to export these settings, "Before Commit" or "Actions on Save", I've checked links above but didn't find a way to do that

0

请先登录再写评论。