forked from CS2103AUG2017-W14-B2/main
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[se-edu#319] Checkstyle: enforce one variable declaration per line (s…
…e-edu#671) Having several variables are on the same line risk having conflicts for unrelated modifications by different developers. This rule checks for multiple variable declarations on single lines such as these, int a; int b; int a, b; while still allow multiple variable declarations on single statements such as these, int a, b; Let's teach Checkstyle to enforce the rule MultipleVariableDeclarations to check that there are no multiple variable declarations on single lines.
- Loading branch information
1 parent
1b9b5c3
commit 56949f2
Showing
3 changed files
with
35 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,40 +24,39 @@ | |
*/ | ||
public class TypicalPersons { | ||
|
||
public static final ReadOnlyPerson ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE, HOON, IDA, AMY, BOB; | ||
public static final String KEYWORD_MATCHING_MEIER = "Meier"; // A keyword that matches MEIER | ||
public static final ReadOnlyPerson ALICE = new PersonBuilder().withName("Alice Pauline") | ||
.withAddress("123, Jurong West Ave 6, #08-111").withEmail("[email protected]") | ||
.withPhone("85355255") | ||
.withTags("friends").build(); | ||
public static final ReadOnlyPerson BENSON = new PersonBuilder().withName("Benson Meier") | ||
.withAddress("311, Clementi Ave 2, #02-25") | ||
.withEmail("[email protected]").withPhone("98765432") | ||
.withTags("owesMoney", "friends").build(); | ||
public static final ReadOnlyPerson CARL = new PersonBuilder().withName("Carl Kurz").withPhone("95352563") | ||
.withEmail("[email protected]").withAddress("wall street").build(); | ||
public static final ReadOnlyPerson DANIEL = new PersonBuilder().withName("Daniel Meier").withPhone("87652533") | ||
.withEmail("[email protected]").withAddress("10th street").build(); | ||
public static final ReadOnlyPerson ELLE = new PersonBuilder().withName("Elle Meyer").withPhone("9482224") | ||
.withEmail("[email protected]").withAddress("michegan ave").build(); | ||
public static final ReadOnlyPerson FIONA = new PersonBuilder().withName("Fiona Kunz").withPhone("9482427") | ||
.withEmail("[email protected]").withAddress("little tokyo").build(); | ||
public static final ReadOnlyPerson GEORGE = new PersonBuilder().withName("George Best").withPhone("9482442") | ||
.withEmail("[email protected]").withAddress("4th street").build(); | ||
|
||
static { | ||
ALICE = new PersonBuilder().withName("Alice Pauline") | ||
.withAddress("123, Jurong West Ave 6, #08-111").withEmail("[email protected]") | ||
.withPhone("85355255") | ||
.withTags("friends").build(); | ||
BENSON = new PersonBuilder().withName("Benson Meier").withAddress("311, Clementi Ave 2, #02-25") | ||
.withEmail("[email protected]").withPhone("98765432") | ||
.withTags("owesMoney", "friends").build(); | ||
CARL = new PersonBuilder().withName("Carl Kurz").withPhone("95352563") | ||
.withEmail("[email protected]").withAddress("wall street").build(); | ||
DANIEL = new PersonBuilder().withName("Daniel Meier").withPhone("87652533") | ||
.withEmail("[email protected]").withAddress("10th street").build(); | ||
ELLE = new PersonBuilder().withName("Elle Meyer").withPhone("9482224") | ||
.withEmail("[email protected]").withAddress("michegan ave").build(); | ||
FIONA = new PersonBuilder().withName("Fiona Kunz").withPhone("9482427") | ||
.withEmail("[email protected]").withAddress("little tokyo").build(); | ||
GEORGE = new PersonBuilder().withName("George Best").withPhone("9482442") | ||
.withEmail("[email protected]").withAddress("4th street").build(); | ||
// Manually added | ||
public static final ReadOnlyPerson HOON = new PersonBuilder().withName("Hoon Meier").withPhone("8482424") | ||
.withEmail("[email protected]").withAddress("little india").build(); | ||
public static final ReadOnlyPerson IDA = new PersonBuilder().withName("Ida Mueller").withPhone("8482131") | ||
.withEmail("[email protected]").withAddress("chicago ave").build(); | ||
|
||
// Manually added | ||
HOON = new PersonBuilder().withName("Hoon Meier").withPhone("8482424") | ||
.withEmail("[email protected]").withAddress("little india").build(); | ||
IDA = new PersonBuilder().withName("Ida Mueller").withPhone("8482131") | ||
.withEmail("[email protected]").withAddress("chicago ave").build(); | ||
// Manually added - Person's details found in {@code CommandTestUtil} | ||
public static final ReadOnlyPerson AMY = new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY) | ||
.withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withTags(VALID_TAG_FRIEND).build(); | ||
public static final ReadOnlyPerson BOB = new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB) | ||
.withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND) | ||
.build(); | ||
|
||
// Manually added - Person's details found in {@code CommandTestUtil} | ||
AMY = new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY) | ||
.withAddress(VALID_ADDRESS_AMY).withTags(VALID_TAG_FRIEND).build(); | ||
BOB = new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB) | ||
.withAddress(VALID_ADDRESS_BOB).withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build(); | ||
} | ||
public static final String KEYWORD_MATCHING_MEIER = "Meier"; // A keyword that matches MEIER | ||
|
||
private TypicalPersons() {} // prevents instantiation | ||
|
||
|