Project

General

Profile

Actions

Patch #31509

closed

Add Rubocop to enforce some styles

Added by Marius BĂLTEANU almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Code cleanup/refactoring
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

I propose to add Rubocop to enforce some styles for those who contribute with patches to Redmine or for those who review the proposed patches.

For the moment, I propose to start only with 2 cops:

  1. Layout/TrailingWhitespace:
    To not have anymore the annoying trailing whitespaces. I used this cop the prepare the patches from #31506 and #31507.
  1. Style/FrozenStringLiteralComment:
    To ensure that the new ruby files added to the codebase have the frozen string literal. As I've mentioned in #31508, we already missed some files.

To run the checks: bundle exec rubocop


Files

0001-Add-Rubocop-and-enable-the-following-cops.patch (1.59 KB) 0001-Add-Rubocop-and-enable-the-following-cops.patch Marius BĂLTEANU, 2019-06-06 10:16
31509-v2.diff (68.6 KB) 31509-v2.diff Go MAEDA, 2019-06-08 09:56
31509-v3.diff (69.1 KB) 31509-v3.diff Go MAEDA, 2019-06-18 17:05
rubocop-0_72_0.diff (2.59 KB) rubocop-0_72_0.diff Go MAEDA, 2019-06-26 07:25
Actions

Also available in: Atom PDF