Skip to content

Instantly share code, notes, and snippets.

@dspinellis
Last active June 11, 2020 12:43
Show Gist options
  • Save dspinellis/4459d0fd86e63b363e406583d1e93fa9 to your computer and use it in GitHub Desktop.
Save dspinellis/4459d0fd86e63b363e406583d1e93fa9 to your computer and use it in GitHub Desktop.
Convert code review text to third person singular
#!/bin/sed -Ef
#
# Convert code review text to third person singular
# Author: Diomidis Spinellis, June 2020
# Released to the public domain
#
# you write -> the code contains
s/\<you write/the code contains/g
# Example: you specify -> the code specifies
s/\<you (\w+)y\>/the code \1ies/g
# Example: you catch -> the code catches
s/\<you (\w+[hsxz]\>)/the code \1es/g
# Example: you call -> the code calls
s/\<you (\w+)/the code \1s/g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment