fix(DocFilter): line count project and global should effective both

This commit is contained in:
林万程
2024-01-26 19:43:51 +08:00
parent 48969443c9
commit 8805785e17

View File

@@ -56,14 +56,11 @@ public class DocFilter {
public static <T extends SettingsInfo> boolean lineCountOrLenOver(@NotNull T info,
@NotNull StringBuilder sb, int lineCount) {
// can not effective both
if (info.projectSettings.projectFilterEffective) {
return lineCountOrLenOverInfo(info.projectSettings, sb, lineCount);
} else if (info.projectSettings.globalFilterEffective) {
return lineCountOrLenOverInfo(info.globalSettings, sb, lineCount);
} else {
return false;
}
boolean overProject = info.projectSettings.projectFilterEffective
&& lineCountOrLenOverInfo(info.projectSettings, sb, lineCount);
boolean overGlobal = info.projectSettings.globalFilterEffective
&& lineCountOrLenOverInfo(info.globalSettings, sb, lineCount);
return overGlobal || overProject;
}
private static boolean lineCountOrLenOverInfo(@NotNull AbstractSettingsState appSettings,