Forked from wojtha/migrate_rubocop_style_to_layout.rb
Last active
January 10, 2019 11:30
-
-
Save Korayem/86060ae7642fa246e657380a39e34bdb to your computer and use it in GitHub Desktop.
Revisions
-
Salem Korayem revised this gist
Jan 10, 2019 . 1 changed file with 0 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,15 +29,13 @@ IndentationWidth IndentHash LeadingCommentSpace MultilineArrayBraceLayout MultilineAssignmentLayout MultilineHashBraceLayout MultilineMethodCallBraceLayout MultilineMethodCallIndentation MultilineMethodDefinitionBraceLayout MultilineOperationIndentation SpaceAfterComma SpaceAroundBlockParameters SpaceAroundEqualsInParameterDefault @@ -52,8 +50,6 @@ SpaceInsideParens SpaceInsideStringInterpolation TrailingBlankLines ] path = '.rubocop.yml' -
Salem Korayem revised this gist
Jan 10, 2019 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,7 +22,6 @@ EndAlignment ExtraSpacing ExtraSpacing FirstParameterIndentation IndentArray IndentAssignment -
Salem Korayem revised this gist
Jan 10, 2019 . 1 changed file with 9 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,29 +9,36 @@ AlignArray AlignHash AlignParameters BlockAlignment CaseIndentation ClosingParenthesisIndentation CommentIndentation DefEndAlignment DotPosition EmptyLineBetweenDefs EmptyLinesAroundBlockBody EmptyLinesAroundClassBody EmptyLinesAroundModuleBody EndAlignment ExtraSpacing ExtraSpacing FileName FirstParameterIndentation IndentArray IndentAssignment IndentationConsistency IndentationWidth IndentHash LeadingCommentSpace MethodName MultilineArrayBraceLayout MultilineAssignmentLayout MultilineHashBraceLayout MultilineMethodCallBraceLayout MultilineMethodCallIndentation MultilineMethodDefinitionBraceLayout MultilineOperationIndentation PredicateName SpaceAfterComma SpaceAroundBlockParameters SpaceAroundEqualsInParameterDefault @@ -46,6 +53,8 @@ SpaceInsideParens SpaceInsideStringInterpolation TrailingBlankLines VariableName VariableNumber ] path = '.rubocop.yml' -
Salem Korayem revised this gist
Jan 10, 2019 . 1 changed file with 49 additions and 38 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,44 +1,55 @@ # source: https://gist.github.com/wojtha/f97f45a6a09f14a58e5721fb178f2d3f # Fixes complains such as: # .rubocop.yml: Style/IndentationConsistency has the wrong namespace - should be Layout # .rubocop.yml: Style/IndentationWidth has the wrong namespace - should be Layout # .rubocop.yml: Style/DotPosition has the wrong namespace - should be Layout layouts = %w[ AccessModifierIndentation AlignArray AlignHash AlignParameters CaseIndentation ClosingParenthesisIndentation CommentIndentation DotPosition EmptyLineBetweenDefs EmptyLinesAroundBlockBody EmptyLinesAroundClassBody EmptyLinesAroundModuleBody ExtraSpacing FirstParameterIndentation IndentArray IndentAssignment IndentationConsistency IndentationWidth IndentHash LeadingCommentSpace MultilineArrayBraceLayout MultilineAssignmentLayout MultilineHashBraceLayout MultilineMethodCallBraceLayout MultilineMethodCallIndentation MultilineMethodDefinitionBraceLayout MultilineOperationIndentation SpaceAfterComma SpaceAroundBlockParameters SpaceAroundEqualsInParameterDefault SpaceAroundOperators SpaceBeforeBlockBraces SpaceBeforeComma SpaceBeforeFirstArg SpaceInLambdaLiteral SpaceInsideBlockBraces SpaceInsideBrackets SpaceInsideHashLiteralBraces SpaceInsideParens SpaceInsideStringInterpolation TrailingBlankLines ] path = '.rubocop.yml' legacy_content = File.read(path) new_content = legacy_content.gsub(/Style\/(#{ layouts.join('|') })/, 'Layout/\1') File.write(path, new_content) -
wojtha revised this gist
Jun 6, 2017 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -37,6 +37,8 @@ TrailingBlankLines ] path = '.rubocop.yml' legacy_content = File.read(path) new_content = legacy_content.gsub(/Style\/(#{ layouts.join('|') })/, 'Layout/\1') File.write(path, new_content) -
wojtha revised this gist
Jun 5, 2017 . 1 changed file with 23 additions and 23 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,37 +4,37 @@ # .rubocop.yml: Style/DotPosition has the wrong namespace - should be Layout layouts = %w[ AccessModifierIndentation AlignArray AlignHash AlignParameters ClosingParenthesisIndentation CommentIndentation DotPosition EmptyLineBetweenDefs EmptyLinesAroundBlockBody EmptyLinesAroundClassBody EmptyLinesAroundModuleBody ExtraSpacing FirstParameterIndentation IndentArray IndentationConsistency IndentationWidth IndentHash LeadingCommentSpace MultilineMethodCallIndentation MultilineOperationIndentation SpaceAfterComma SpaceAroundEqualsInParameterDefault SpaceAroundOperators SpaceBeforeBlockBraces SpaceBeforeComma SpaceInsideBlockBraces SpaceInsideBrackets SpaceInsideHashLiteralBraces SpaceInsideParens SpaceInsideStringInterpolation TrailingBlankLines ] legacy_content = File.read('.rubocop.yml') -
wojtha created this gist
Jun 5, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,42 @@ # Fixes complains such as: # .rubocop.yml: Style/IndentationConsistency has the wrong namespace - should be Layout # .rubocop.yml: Style/IndentationWidth has the wrong namespace - should be Layout # .rubocop.yml: Style/DotPosition has the wrong namespace - should be Layout layouts = %w[ IndentationConsistency IndentationWidth DotPosition AccessModifierIndentation IndentArray IndentHash MultilineOperationIndentation SpaceAroundOperators SpaceAroundEqualsInParameterDefault SpaceInsideHashLiteralBraces SpaceInsideBlockBraces TrailingBlankLines ExtraSpacing SpaceBeforeComma SpaceInsideParens SpaceInsideStringInterpolation SpaceBeforeBlockBraces SpaceInsideBrackets SpaceAfterComma LeadingCommentSpace MultilineMethodCallIndentation EmptyLinesAroundClassBody EmptyLinesAroundModuleBody EmptyLineBetweenDefs EmptyLinesAroundBlockBody FirstParameterIndentation AlignParameters AlignArray AlignHash ClosingParenthesisIndentation CommentIndentation ] legacy_content = File.read('.rubocop.yml') new_content = legacy_content.gsub(/Style\/(#{ layouts.join('|') })/, 'Layout/\1') File.write('.rubocop.yml', new_content)