[Feature Request] Make Comparison Code Style Option Per Project
First, thank you for reporting a bug or making a request. That takes time and we appreciate that!
Let's start with common details:
| Subject | Details |
|---|---|
| Issue type | Feature request |
| Plugin | Php Inspections (EA Ultimate) |
| Language level | PHP 7.2 |
Current behaviour (description/screenshot:)
In Other Settings, Comparison code style You can choose between Regular comparison style or Yoda comparison style. This is at a user/ account level.
Expected behaviour
Ability to choose Regular or Yoda style per projects.
Notes
I work on both WordPress (Yoda Style) and Laravel (Regular Style) Projects on the same machine. Currently each time I switch projects, I have to change this setting.
Do you store .idea/codeStyles in the project?
CodeStyle can be configured per project. Just select a specific schema. Go to Settings -> Editor -> Code style -> Php and select proper schema.
https://www.jetbrains.com/help/idea/settings-code-style.html https://www.jetbrains.com/help/idea/configuring-code-style.html
@funivan What do you mean by store code? Each project is in its own folder, and as separate PHPStorm projects, each with their own .idea folder.
You need to create 2 different schemas.
For example WP Code style and Laravel Code style. Then select the proper one for the project.
And changing one schema - will not affect another.
Then you can add a project schema to .git and all collaborators will have the same settings of the code style.
@funivan: we don't utilize code style settings currently. This means our global settings wil be really annoying when jumping between projects with different CS.
Oops. Sorry about that. I forgot that this configuration is moved from code style schema.
@funivan no worries =) @spenserhale I'l target the next release for this feature, it seems to be in demand.