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

"Check All Modified Files" checks staged added files but not unstaged added files #558

Open
TysonMN opened this issue Apr 8, 2022 · 4 comments

Comments

@TysonMN
Copy link

TysonMN commented Apr 8, 2022

In the CheckStyle window, there is a button with hovertext that says

Check All Modified Files

When this button is clicked, the files it considers include

  • edited and unstaged
  • edited and staged
  • added and staged

The files it does not consider include

  • added and unstaged

I would prefer if added and unstaged files were also considered.

Is this something that the maintainers are willing to change?


Video showing that

  • edited and unstaged files are considered
  • added and unstaged files not considered
  • added and staged files are considered

Screen Recording 2022-04-07 at 8 39 07 PM

Video is created with CheckStyle version: 5.63.0

@TysonMN
Copy link
Author

TysonMN commented Apr 8, 2022

After looking at

...the only possible alternative implementations that I see would involve

None of these functions are documented though, so I think the only way to understand what they do is to try them and see what effective set of VirtualFiles are returned.

@jshiell
Copy link
Owner

jshiell commented Apr 10, 2022

It does seem a bit inconsistent, doesn't it? I would have presumed it'll be consistent on the stage vs unstaged, at the very least.

While I'm very open to changing it, I'm wary of delving into specifics of the IDEA implemenation. The API has a long history of being both a bit odd and badly documented, and I'm very wary of trying to reverse engineer it, especially with regards to future behaviour.

As far as I can tell with a bit of poking around, Changes are the individual edits, so a very granular set that would have to be transformed into file-level changes. LocalChangeLists would just allow us to operate on the individual lists that are managed by the ChangeListManager, and hence I'd expect the same result.

getModifiedWithoutEditing seems like the only valid possibility, but frankly I've no idea quite what it does. My GoogleFu has failed me, and I'm not confident enough in my understanding of the impl to comment.

@TysonMN
Copy link
Author

TysonMN commented Apr 10, 2022

I am willing to try/test all three methods, but I don't know how.

After I make each change, is it possible for me to locally create a new version of the plug-in that I can add as an extension to my IntelliJ?

@jshiell
Copy link
Owner

jshiell commented Apr 10, 2022

Oh yes, it's just a Gradle build, e.g.

./gradlew clean test xtest buildPlugin 

Drop the test bits if you just want to jam it in for experimentation, of course. That'll generate the plugin zip in build/distributions - which you can then install in IDEA using "install plugin from disk" in the plugin panel.

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

No branches or pull requests

2 participants