Skip to content

Conversation

@labkey-adam
Copy link

Rationale

New JSONObject is better

@bbimber
Copy link
Collaborator

bbimber commented Feb 10, 2023

@labkey-adam, is there some intellij code review function to correct trivial things like adding @OverRide across a whole directory or module, as opposed to file-by-file? I've bene trying to correct these as i see them too, but it'd be nice to be more systematic and project-wide.

@labkey-adam
Copy link
Author

@labkey-adam, is there some intellij code review function to correct trivial things like adding @OverRide across a whole directory or module, as opposed to file-by-file? I've bene trying to correct these as i see them too, but it'd be nice to be more systematic and project-wide.

Yes, the non-functional changes are mostly the result of being in the top-level class (interfaces in these cases, but could be an abstract class or even a concrete class), IntelliJ flagging methods as "overrides lack @Override annotations", and hitting Alt + Enter. IntelliJ adds the annotation to every overridden method. Also, if you look at my platform PR you'll see interfaces with private static final and similar removed, since that's redundant. IntelliJ flags these and offers "Clean up this file", which removes all of them. And there were some cases of JavaDoc with empty @returns which is not useful; those went away with "Clean up all JavaDoc issues".

@bbimber
Copy link
Collaborator

bbimber commented Feb 10, 2023

hi @labkey-adam, i did see the interface-level changes which are useful. maybe I'm missing this in your reply, but is there any way to execute such changes module or folder-wide, as opposed to class/interface by class?

@labkey-tchad
Copy link
Member

hi @labkey-adam, i did see the interface-level changes which are useful. maybe I'm missing this in your reply, but is there any way to execute such changes module or folder-wide, as opposed to class/interface by class?

If you select the directory you want to scan, you can select "Inspect Code..." from the Code menu. From that dialog, you can either run all of the normal inspections that are run on your open files, or you can customize it to just run the inspection for missing override annotations.

@labkey-adam labkey-adam merged commit cbdb2a7 into develop Feb 10, 2023
@labkey-adam labkey-adam deleted the fb_json branch February 10, 2023 16:40
bbimber added a commit that referenced this pull request Jul 14, 2024
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

Successfully merging this pull request may close these issues.

4 participants