Maxim Muzafarov created CASSANDRA-18277:
-------------------------------------------

             Summary: Move the IntelliJ Idea code style and inspections 
configuration to the project's root .idea directory
                 Key: CASSANDRA-18277
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18277
             Project: Cassandra
          Issue Type: Task
          Components: Build
            Reporter: Maxim Muzafarov
            Assignee: Maxim Muzafarov


h4. Current State

Each IDE supported by Cassandra has its own configuration files, which we store 
in a special 'ide' directory in the project root. idea - for the IntelliJ IDEA 
configuration, nbproject - for the NetBeans, and there is currently no 
directory for the Eclipse configuration exist.

We use ant tasks for initial project setup for a particular IDE:
* generate-idea-files
* generate-eclipse-files

For NetBeans you always choose the ide/nbproject directory as the root of the 
project, so that the code style configuration for the NetBeans is always shared 
between developers.

h4. The Issues With Current State

There are a few inconveniences we are currently facing that could be resolved 
by sharing the IntelliJ IDEA code style settings through VCS:
# Once a new checkstyle lint is implemented, and the IDE's code style 
configuration is updated they are not immediately available to a developer. The 
developer must track the git history to use the latest code style changes and 
manually copy the updated code style files into the .idea directory, or re-run 
the generate-idea-files task which will erase any locally saved settings (e.g. 
words dictionaries);
# The code style usually changes by adding new rules one by one, and new 
checkstyle lints are implemented, so it may differ between release branches. It 
is a common practice to keep the code style on the same branch so that IntelliJ 
can use an appropriate configuration for the branch being checked out.
# The IntelliJ IDEA code style configuration format that stored the 
codeStyleSettings.xml file is outdated, from version 2017.3 the codeStyle 
directory is used. This prevents us from updating the code style configuration 
without a lot of tedious manual changes.

The share project settings through VCS approach is well described in the 
documentation pages:
https://www.jetbrains.com/help/idea/configure-project-settings.html#share-project-through-vcs

h4. What To Do

# Migrate the IntelliJ code style configuration to the new format, assuming 
nobody is using such an old version of IntelliJ IDEA;
# Move the code style configuration and inspections configuration files to the 
project's root .idea directory to address the issues described above;
# Rely on the IntelliJ IDEA code style for backward compatibility instead of 
supporting it ourselves;






--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to