-
I am a neovim user and software engineer working on a rails 6.1 ruby 2.7 application.
-
All constants in the application use the
SCREAMING_SNAKE_CASE
naming convention. -
The rubocop style guide suggests that I don't have to follow this convention when the constant refers to a class. For those that refer to a class, they can be PascalCased like classes normally are in ruby.
-
I'm using ripgrep, and in vim I have a plugin where I can send search queries to ripgrep via the
:Rg
command. -
I've written a ripgrep query to find all instances of where a class is assigned to a SCREAMING_SNAKE_CASE constant.
:Rg "[A-Z][A-Z0-9_]+\s+=\s+[A-Z][a-z]" -g "**/*.rb"