[ 
https://issues.apache.org/jira/browse/HBASE-23707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17092053#comment-17092053
 ] 

Mingliang Liu commented on HBASE-23707:
---------------------------------------

[~ndimiduk] Lovely as it is, I found this settings file being under ".idea/" 
directory would make the (new) project import stop working. The problem I have 
can be reproduced as following:
 1. git clone [email protected]:apache/hbase.git ./myhbase
 2. IntelliJ IDEA -> File -> New project from existing sources (or Open)
 3. The project is just opened, but the Maven modules, source/test code 
structure and indexing, and other project auto-import stuff just do not happen.

In this situation, it fails to know a file is Java source. The reason I *guess* 
is because we have existing ".idea/" directory in source code tree, where only 
one checkstyle plugin file is provided. IntelliJ is not smart enough to know 
this project has been imported. So I removed this checkstyle settings file (and 
".idea/" directory), the import start working. I can run unit tests there.

Can you reproduce this? If this is not what I did something wrong, I propose we 
put this plugin setting file into the "dev-support/ " directory. And we can 
kindly let developer know (in doc somewhere) they can replace the 
".idea/checkstyle-idea.xml" with "dev-support/idea/checkstyle-idea.xml" file 
manually after importing project (or we have a helper script in future?). This 
manual step seems fine since developer will need to manually install CheckStyle 
plugin anyway. If this looks good, I can file a simple patch to rename this 
file. I saw some projects commit their whole IntelliJ settings into source 
code, but I'm not sure that is better give so any personal settings will get 
those files "dirty" in git.

I tried with MacOS and Linux. IntelliJ version is
{code:java}
IntelliJ IDEA 2020.1 (Ultimate Edition)
Build #IU-201.6668.121, built on April 8, 2020

Runtime version: 11.0.6+8-b765.25 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.3
GC: ParNew, ConcurrentMarkSweep
Memory: 8029M
Cores: 8
Non-Bundled Plugins: CheckStyle-IDEA, intellij-shellscript, com.paperetto.dash, 
io.protostuff.protostuff-jetbrains-plugin, org.intellij.plugins.hcl
{code}

> Add IntelliJ check style plugin configuration
> ---------------------------------------------
>
>                 Key: HBASE-23707
>                 URL: https://issues.apache.org/jira/browse/HBASE-23707
>             Project: HBase
>          Issue Type: Sub-task
>          Components: build
>            Reporter: Nick Dimiduk
>            Assignee: Nick Dimiduk
>            Priority: Minor
>             Fix For: 3.0.0, 2.3.0, 1.6.0
>
>
> IntelliJ defines project configuration across a number of files, specifically 
> so that some configurations can be committed with the source repository. The 
> checkstyle plugin configuration is one such config file; add it.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to