From 48d8850ffcd880f29329ed2cac90bbbde816bf08 Mon Sep 17 00:00:00 2001 From: Afevis Date: Mon, 6 May 2024 20:38:13 -0400 Subject: [PATCH] Greps for pronoun helper spelling mistakes (#83086) Fixes #83083 These are case sensitive --- code/__DEFINES/pronouns.dm | 2 ++ code/game/machinery/dna_infuser/organ_sets/carp_organs.dm | 2 +- .../game/machinery/dna_infuser/organ_sets/gondola_organs.dm | 2 +- code/game/machinery/dna_infuser/organ_sets/rat_organs.dm | 2 +- tools/ci/check_grep.sh | 6 ++++++ 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/code/__DEFINES/pronouns.dm b/code/__DEFINES/pronouns.dm index c0515426e35..d137970f217 100644 --- a/code/__DEFINES/pronouns.dm +++ b/code/__DEFINES/pronouns.dm @@ -17,6 +17,8 @@ /// s, null (she looks, they look) "%PRONOUN_s" = "p_s" /// es, null (she goes, they go) "%PRONOUN_es" = "p_es" +/// Don't forget to update the grep if you add more! tools/ci/check_grep.sh -> pronoun helper spellcheck + /// A list for all the pronoun procs, if you need to iterate or search through it or something. #define ALL_PRONOUNS list( \ "%PRONOUN_they" = TYPE_PROC_REF(/datum, p_they), \ diff --git a/code/game/machinery/dna_infuser/organ_sets/carp_organs.dm b/code/game/machinery/dna_infuser/organ_sets/carp_organs.dm index f44de87e92e..725d1b9ce85 100644 --- a/code/game/machinery/dna_infuser/organ_sets/carp_organs.dm +++ b/code/game/machinery/dna_infuser/organ_sets/carp_organs.dm @@ -113,7 +113,7 @@ /obj/item/organ/internal/brain/carp/Initialize(mapload) . = ..() AddElement(/datum/element/organ_set_bonus, /datum/status_effect/organ_set_bonus/carp) - AddElement(/datum/element/noticable_organ, "%PRONOUN_They seem%PRONOUN_S unable to stay still.") + AddElement(/datum/element/noticable_organ, "%PRONOUN_They seem%PRONOUN_s unable to stay still.") /obj/item/organ/internal/brain/carp/on_mob_insert(mob/living/carbon/brain_owner) . = ..() diff --git a/code/game/machinery/dna_infuser/organ_sets/gondola_organs.dm b/code/game/machinery/dna_infuser/organ_sets/gondola_organs.dm index a36ebc1d3c3..3f1983f8836 100644 --- a/code/game/machinery/dna_infuser/organ_sets/gondola_organs.dm +++ b/code/game/machinery/dna_infuser/organ_sets/gondola_organs.dm @@ -31,7 +31,7 @@ Fluoride Stare: After someone says 5 words, blah blah blah... /obj/item/organ/internal/heart/gondola/Initialize(mapload) . = ..() AddElement(/datum/element/organ_set_bonus, /datum/status_effect/organ_set_bonus/gondola) - AddElement(/datum/element/noticable_organ, "%PRONOUN_They radiate%PRONOUN_S an aura of serenity.") + AddElement(/datum/element/noticable_organ, "%PRONOUN_They radiate%PRONOUN_s an aura of serenity.") /obj/item/organ/internal/heart/gondola/Insert(mob/living/carbon/receiver, special, movement_flags) . = ..() diff --git a/code/game/machinery/dna_infuser/organ_sets/rat_organs.dm b/code/game/machinery/dna_infuser/organ_sets/rat_organs.dm index 56b147ffbee..2da7a4fd982 100644 --- a/code/game/machinery/dna_infuser/organ_sets/rat_organs.dm +++ b/code/game/machinery/dna_infuser/organ_sets/rat_organs.dm @@ -61,7 +61,7 @@ /obj/item/organ/internal/heart/rat/Initialize(mapload) . = ..() AddElement(/datum/element/organ_set_bonus, /datum/status_effect/organ_set_bonus/rat) - AddElement(/datum/element/noticable_organ, "%PRONOUN_They hunch%PRONOUN_ES over unnaturally!") + AddElement(/datum/element/noticable_organ, "%PRONOUN_They hunch%PRONOUN_es over unnaturally!") /obj/item/organ/internal/heart/rat/on_mob_insert(mob/living/carbon/receiver) . = ..() diff --git a/tools/ci/check_grep.sh b/tools/ci/check_grep.sh index 5a3606d71ed..a9e7e11117a 100644 --- a/tools/ci/check_grep.sh +++ b/tools/ci/check_grep.sh @@ -288,6 +288,12 @@ if [ "$pcre2_support" -eq 1 ]; then echo -e "${RED}ERROR: Initialize override without 'mapload' argument.${NC}" st=1 fi; + part "pronoun helper spellcheck" + if $grep -P '%PRONOUN_(?!they|They|their|Their|theirs|Theirs|them|Them|have|are|were|do|theyve|Theyve|theyre|Theyre|s|es)' $code_files; then + echo + echo -e "${RED}ERROR: Invalid pronoun helper found.${NC}" + st=1 + fi; else echo -e "${RED}pcre2 not supported, skipping checks requiring pcre2" echo -e "if you want to run these checks install ripgrep with pcre2 support.${NC}"