WebicityBrowser/Webicity

View on GitHub

Showing 103 of 459 total issues

Method isInflexible has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

private static boolean isInflexible(FlexItem flexItem, boolean isFlexShrink) {
boolean canShrink = isFlexShrink && flexItem.getFlexShrink() != 0;
boolean canGrow = !isFlexShrink && flexItem.getFlexGrow() != 0;
boolean shrinkedTooMuch = isFlexShrink && flexItem.getHypotheticalMainSize() < flexItem.getBaseSize();
boolean grownTooMuch = !isFlexShrink && flexItem.getHypotheticalMainSize() > flexItem.getBaseSize();

Method parseStatusMessage has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

private static String parseStatusMessage(PushbackInputStream inputStream) throws IOException {
StringBuilder statusMessage = new StringBuilder();
while (true) {
int ch = inputStream.read();
if (!(ASCIIUtil.isVisibleASCIICharacter(ch) || ParseUtil.isObsText(ch) || ch == 0x09 || ch == ' ' || ch == '\r')) {

Method process has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

@Override
public void process(SharedContext context, ParsingContext parsingContext, int ch) throws IOException {
parsingContext.readerHandle().unread(ch);
int [] referenceCodepoints = consumeReference(parsingContext.readerHandle());
Severity
Category
Status
Source
Language