Bug #23245
closedRubocop issues in master
Description
Offenses:
ansible/app/models/setting/ansible.rb:85:18: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
N_("Disable host configuration status turning to out of sync for %s after report does not arrive within configured interval") % 'Ansible',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ansible/app/models/setting/ansible.rb:85:80: C: Style/FormatStringToken: Prefer template tokens (like %{foo}) over unannotated tokens (like %s).
N_("Disable host configuration status turning to out of sync for %s after report does not arrive within configured interval") % 'Ansible',
^
ansible/app/models/setting/ansible.rb:85:81: C: Metrics/LineLength: Line is too long. [152/80]
N_("Disable host configuration status turning to out of sync for %s after report does not arrive within configured interval") % 'Ansible',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ansible/app/models/setting/ansible.rb:87:19: C: Style/FormatStringToken: Prefer template tokens (like %{foo}) over unannotated tokens (like %s).
N_('%s out of sync disabled') % 'Ansible'
^^
ansible/app/services/foreman_ansible/ui_roles_importer.rb:14:5: W: Lint/UnneededCopDisableDirective: Unnecessary disabling of Performance/HashEachMethods (did you mean Performance/ReverseEach?).
# rubocop:disable Performance/HashEachMethods
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ansible/lib/foreman_ansible/engine.rb:28:35: C: Style/ExpandPathArguments: Use expand_path('../..', dir) instead of expand_path('../../..', FILE).
locale_dir = File.join(File.expand_path('../../..', FILE), 'locale')
^^^^^^^^^
ansible/lib/foreman_ansible/engine.rb:113:20: W: Lint/UnneededCopEnableDirective: Unnecessary enabling of ClassLength.
# rubocop:enable ClassLength
^^^^^^^^^
ansible/test/unit/services/inventory_creator_test.rb:88:11: C: Layout/DotPosition: Place the . on the previous line, together with the method call receiver.
.returns(path_to_key)
^
ansible/test/unit/services/inventory_creator_test.rb:90:11: C: Layout/DotPosition: Place the . on the previous line, together with the method call receiver.
.returns('root')
^
ansible/test/unit/services/inventory_creator_test.rb:92:11: C: Layout/DotPosition: Place the . on the previous line, together with the method call receiver.
.returns('2222')
^
84 files inspected, 10 offenses detected
RuboCop failed!
Updated by The Foreman Bot about 6 years ago
- Status changed from New to Ready For Testing
- Assignee set to Daniel Lobato Garcia
- Pull request https://github.com/theforeman/foreman_ansible/pull/165 added
Updated by Daniel Lobato Garcia about 6 years ago
- Status changed from Ready For Testing to Closed
This got merged already