In our IntelliJ projects where we are using Gradle, the file .idea/compiler.xml and files inside the .idea/artifacts folder are automatically generated by IntelliJ based on the Gradle build model. As these files are generated, they should be ignored in version control.
When IntelliJ project is created as a file-based (i.e. without `.idea` folder, but with `.iws`, `.iml` and `.ipr` files), and this is a Gradle or Maven project with auto-import, should ignore them as well for the same reason we ignore `.idea` folder content in that case.
Add extra commented section to use when using Gradle or Maven auto-import.
These are mentioned in the original reference for optional excludes (https://intellij-support.jetbrains.com/hc/en-us/articles/206544839).
If this would be better as a separate, non-commented ignore file, let me know and I will resubmit.
.idea/misc.xml used to contain usage statistics. This was broken out to usage.statistics.xml in the latest EAP (2018.2 EAP). It should be excluded from git.
See https://youtrack.jetbrains.com/issue/IDEA-192913
Since IDEA 14 (2014), IDEA and other contemporaneous JebBrains IDEs don't store sensitive info in `datasources.xml` and it makes sense to version control to share project data sources among the team. `dataSources.local.xml` is user-specific: contain usernames and could be sensitive from a security perspective, albeit passwords could be externalized to e.g. Mac Keychain.
References: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839, https://youtrack.jetbrains.com/issue/IDEA-127105
**Reasons for making this change:**
The file `replstate.xml` contains the history of the Clojure REPL
that Cursive adds to IntelliJ. Obviously that's user-specific,
and not relevant to other users.
**Links to documentation supporting these rule changes:**
This file is not well-documented, but in cursive-ide/cursive#1325,
the Cursive developers state that this is the REPL history file,
and that deleting it is acceptable troubleshooting if it's
causing trouble.
In newer versions of the IntelliJ platform (such as the one used for Rider), the .idea files are now placed in a subdirectory of the same, named after the current project (such as ".idea/.idea.Everlook/.idea/workspace.xml"). Adding a double-star pattern to these folder rules will also ignore these new files and maintain backwards compatibility with previous revisions of this file.
Intellij's iml file can be anywhere on the path.
This is true for multi-module maven project where each module has its own $projectName.iml file in its own directory.