nus-cs2103-AY2223S2 / forum

12 stars 0 forks source link

Irreparable Checkstyle errors #262

Closed daytona65 closed 1 year ago

daytona65 commented 1 year ago

I have tried alot of things so please help. My import statements: image

My error: image

How to fix? have tried rearranging the statements in every imaginable way possible

daitenshionyan commented 1 year ago

Try this:

import static java.util.Objects.requireNonNull;
import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;
import static seedu.address.logic.parser.CliSyntax.PREFIX_NRIC;
import static seedu.address.logic.parser.CliSyntax.PREFIX_STATUS

import java.util.function.Predicate;

import seedu.address.commons.core.Messages;
import seedu.address.model.Model;

I think the checkstyle wants us to put static imports at the top.

rexcyrio commented 1 year ago

You can also try configuring IntelliJ's import order to better match the checkstyle.

daytona65 commented 1 year ago

Thanks daitenshionyan! seems like that works