Skip to content
Snippets Groups Projects
Commit a5f05024 authored by Markus Reiter's avatar Markus Reiter
Browse files

Add Regex for `Style/FileName` cop.

parent 59212445
No related branches found
No related tags found
No related merge requests found
......@@ -98,10 +98,14 @@ Style/IfUnlessModifier:
Enabled: false
# dashes in filenames are typical
# TODO: enforce when rubocop has fixed this
# https://github.com/bbatsov/rubocop/issues/1545
Style/FileName:
Enabled: false
# matches:
# file_name.rb (default)
# file-name.rb, --filename.rb (command names)
# FILENAME.rb (ARGV and ENV)
# does not match:
# dashes-and_underscores.rb
Regex: !ruby/regexp /^((([\dA-Z]+|[\da-z]+)(_([\dA-Z]+|[\da-z]+))*|(\-\-)?([\dA-Z]+|[\da-z]+)(-([\dA-Z]+|[\da-z]+))*))(\.rb)?$/
# no percent word array, being friendly to non-ruby users
# TODO: enforce when rubocop has fixed this
......
......@@ -91,7 +91,7 @@ Style/Documentation:
Enabled: false
Style/FileName:
Enabled: false
Regex: !ruby/regexp /^((([\dA-Z]+|[\da-z]+)(_([\dA-Z]+|[\da-z]+))*|(\-\-)?([\dA-Z]+|[\da-z]+)(-([\dA-Z]+|[\da-z]+))*))(\.rb)?$/
Style/HashSyntax:
EnforcedStyle: ruby19_no_mixed_keys
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment