Add new RuboCop Gettext/StaticIdentifier
This cop ensures that only static strings are passed to gettext translation methods `_()`, `s_()`, `n_()`, `N_()`. Any kind of interpolation, formatting, or concatenation is disallowed. The following definitions are allowed: * Local variables * Method calls which are not mentioned above * Constants Generate TODOs for pending offenses in Ruby code.
显示
- .rubocop_todo/gettext/static_identifier.yml 28 个添加, 0 个删除.rubocop_todo/gettext/static_identifier.yml
- rubocop/cop/gettext/static_identifier.rb 84 个添加, 0 个删除rubocop/cop/gettext/static_identifier.rb
- spec/rubocop/cop/gettext/static_identifier_spec.rb 174 个添加, 0 个删除spec/rubocop/cop/gettext/static_identifier_spec.rb
.rubocop_todo/gettext/static_identifier.yml
0 → 100644
rubocop/cop/gettext/static_identifier.rb
0 → 100644
想要评论请 注册 或 登录