Skip to content

Commit

Permalink
Add stuff and things
Browse files Browse the repository at this point in the history
  • Loading branch information
yadobler committed Sep 24, 2024
1 parent f0defe5 commit 8f24418
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
11 changes: 7 additions & 4 deletions code_standard_violation_checker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,22 @@
# shellcheck disable=SC2069
if command -v rg
then
GREP_PROG='rg --pcre2'
# GREP_PROG='rg --pcre2'
GREP_PROG='rg'
else
GREP_PROG='grep -r --perl-regexp --color --include *.java'
# GREP_PROG='grep -r --perl-regexp --color --include *.java'
GREP_PROG='grep -r --color --include *.java'
fi

PRINT_OUTPUT=$([ "$1" == "-p" ] && echo true || echo false)

BOOLEAN_VIOLATION='(?<!@) boolean [^is|^are|^has|^should]'
# BOOLEAN_VIOLATION='(?<!@) boolean [^is|^are|^has|^should]'
BOOLEAN_VIOLATION='^[^@]* boolean [^is|^are|^has|^should]'
BOOLEAN_VIOLATION_COUNT=$($GREP_PROG "$BOOLEAN_VIOLATION" src | wc -l)
[ "$PRINT_OUTPUT" == true ] && $GREP_PROG "$BOOLEAN_VIOLATION" src
echo "$BOOLEAN_VIOLATION_COUNT" boolean naming violations found.


# '(?<=\*) @.* .*$'
NO_PERIOD_VIOLATION='\* @.*[^\.]$'
NO_PERIOD_VIOLATION_COUNT=$($GREP_PROG "$NO_PERIOD_VIOLATION" src | wc -l)
[ "$PRINT_OUTPUT" == true ] && $GREP_PROG "$NO_PERIOD_VIOLATION" src
Expand Down
1 change: 0 additions & 1 deletion src/main/java/yappingbot/tasks/tasklist/TaskList.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ public int size() {
* @throws YappingBotOobException Exception if index provided is out of bounds.
*/
public Task get(int index) throws YappingBotOobException {
assert tasks != null;
assert tasks.size() == size;
if (index < 0 || index >= size) {
throw new YappingBotOobException(ReplyTextMessages.SELECT_TASK_MISSING_TEXT_1d, index);
Expand Down
24 changes: 12 additions & 12 deletions src/main/resources/view/DialogBox.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
<padding>
<Insets bottom="15.0" left="5.0" right="5.0" top="15.0" />
</padding>
<VBox id="labelsVbox" fx:id="labelsVbox" spacing="5.0" HBox.hgrow="ALWAYS">
<children>
<Label fx:id="dialog" alignment="TOP_LEFT" minHeight="-Infinity" text="Label" wrapText="true" />
</children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</VBox>
<VBox id="labelsVbox" fx:id="labelsVbox" spacing="5.0" HBox.hgrow="ALWAYS">
<children>
<Label fx:id="dialog" alignment="TOP_LEFT" minHeight="-Infinity" text="Label" wrapText="true" />
</children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</VBox>
<ImageView fx:id="displayPicture" fitHeight="99.0" fitWidth="99.0" pickOnBounds="true" preserveRatio="true" />
<stylesheets>
<URL value="@../css/dialogbox.css" />
<URL value="@../css/mainwindow.css" />
</stylesheets>
<stylesheets>
<URL value="@../css/dialogbox.css" />
<URL value="@../css/mainwindow.css" />
</stylesheets>
</fx:root>

0 comments on commit 8f24418

Please sign in to comment.