Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files/folders marked as ignored in IntelliJ's project are shown as 'never used' in the .gitignore file #47

Closed
drewnoakes opened this issue Aug 12, 2014 · 9 comments
Labels

Comments

@drewnoakes
Copy link

Specifically, I have marked the .idea folder as ignored in the project panel (or project structure -- it's the same.)

Now the /.idea entry in the .gitignore file has a yellow squiggly line saying:

'/.idea' entry is never used

Also, IntelliJ generates classes into the /out folder, and this is marked as 'never used' as well.

image


Other files in there (such as /nbproject, *.project and so on) apply to other developer's project structures which are not in the repo. I don't understand the value of marking these to look like errors. It might be more sensible to display them as redundant (greyed out).

hsz added a commit that referenced this issue Aug 14, 2014
@hsz
Copy link
Member

hsz commented Aug 14, 2014

In release 0.5.4 there will be introduced grayed out unused entry inspection. Quick preview below:

zrzut ekranu z 2014-08-14 02 59 44

@drewnoakes
Copy link
Author

Great! That looks much better.

I guess I'm guilty of mentioning two items in the one issue.

In your example, if you mark the .idea folder as ignored in the project view, does the corresponding line in the .gitignore file become grey as well? I think it shouldn't, as the folder is clearly on the disk. In the current version it seems that the plugin uses the project structure, rather than looking at the working tree directly.

image

@hsz
Copy link
Member

hsz commented Aug 14, 2014

The problem with excluded files/directories is that IntelliJ excludes those files also from VirtualFile tree which is used to obtain gitignore rules.

I have to do some workaround for this issue. I cannot tell you if it will be fixed or not right now.

@drewnoakes
Copy link
Author

Understood. Is there a way to map a virtual file back to the underlying file system?

It might be enough to know that the folder has been marked as ignored. Perhaps you can find out what paths the user has marked as ignored and use that.

@hsz hsz closed this as completed in ff7d7db Aug 14, 2014
@hsz
Copy link
Member

hsz commented Aug 15, 2014

@drewnoakes Fixed with release 0.5.4. Please confirm if everything works well.

@drewnoakes
Copy link
Author

Wow you're really hitting this! Nice! I'll be sure to test it out once I upgrade.

@drewnoakes
Copy link
Author

Just installed 0.5.4 on a different project. Seems the formatting of the 'unused entry' feature isn't quite right on my system. See screenshot:

image

You can see that the formatting of /tools/instruments.json is different, but it's not grey. I don't think I've done anything special to my colour settings. Is anyone else seeing this?

Running IDEA 13.1.4 with Cursive Clojure plugin on Ubuntu 14.04.

@hsz hsz reopened this Aug 19, 2014
@76200
Copy link

76200 commented Aug 19, 2014

@drewnoakes Same here, unused entries are not grey 👍

@hsz hsz closed this as completed Aug 26, 2014
@hsz hsz added the bug label Apr 16, 2015
@VasekPurchart
Copy link

Hi, I just started using PHPStorm and found this great plugin, but immediately stumbled upon this issue, my first guess was that it has something to do with excluded folders, which it obviously does.

I just wonder why is this issue closed? I think it is still reported with false positives and previous comments here tell the same tale?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants