diff options
| author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-02 15:09:07 -0700 |
|---|---|---|
| committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-02 15:09:07 -0700 |
| commit | 7a1a6c8ef26c787e4b6dd1602f3d158b37e81720 (patch) | |
| tree | 1e390cd535b38368d091cbb33e5d419408d5ce00 /lib/chef/util/diff.rb | |
| parent | 77f8739a4741e2370e40ec39345a92a6ea393a1a (diff) | |
| download | chef-7a1a6c8ef26c787e4b6dd1602f3d158b37e81720.tar.gz | |
fix Layout/EmptyLineAfterGuardClause
i like this one, gives visual priority to returns or raises that are
buried in the middle of things.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/util/diff.rb')
| -rw-r--r-- | lib/chef/util/diff.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/chef/util/diff.rb b/lib/chef/util/diff.rb index decff35d85..64cf41fab2 100644 --- a/lib/chef/util/diff.rb +++ b/lib/chef/util/diff.rb @@ -58,6 +58,7 @@ class Chef def for_reporting # caller needs to ensure that new files aren't posted to resource reporting return nil if @diff.nil? + @diff.join("\\n") end @@ -111,6 +112,7 @@ class Chef file_length_difference = hunk.file_length_difference next unless old_hunk next if hunk.merge(old_hunk) + diff_str << old_hunk.diff(:unified) << "\n" ensure old_hunk = hunk @@ -170,6 +172,7 @@ class Chef return buff !~ /\A[\s[:print:]]*\z/m rescue ArgumentError => e return true if e.message =~ /invalid byte sequence/ + raise end end |
