BigW Consortium Gitlab
fix syntax error on 2.1 and rubocop on 2.2 Background: Hashes `{:'key': 'value'}` are not valid in 2.1 but are recommended by Rubocop on 2.2. We only use those when we have a key such as `weird-key`, `weird.key`, etc... We could disable Rubocop but it wouldn't warn us about the recommended syntax since `Ruby 1.9`: `{key: 'value'}`, which is valid for `Ruby 1.9+`. Workaround 1 could be disabling `Style/HashSyntax:` in `rubocop.yml`. Workaround 2 (tried in this MR) is to trick Rubocop using `.to_sym` which is effectively the same as adding the `:`. This would allow to keep the warning in place. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/12801 See merge request !2637
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
assets | Loading commit data... | |
controllers | Loading commit data... | |
finders | Loading commit data... | |
helpers | Loading commit data... | |
mailers | Loading commit data... | |
models | Loading commit data... | |
services | Loading commit data... | |
uploaders | Loading commit data... | |
validators | Loading commit data... | |
views | Loading commit data... | |
workers | Loading commit data... |