summaryrefslogtreecommitdiff
path: root/app/models/concerns/blob_language_from_git_attributes.rb
diff options
context:
space:
mode:
authorAndrew Newdigate <andrew@gitlab.com>2019-02-08 14:19:53 +0200
committerAndrew Newdigate <andrew@gitlab.com>2019-03-06 17:51:56 +0200
commit3288e1a874ec0184f9f27f932748e51c57babf17 (patch)
tree9f8667f5349ecfc59f3c8a6e9641cb1e32fa3d5b /app/models/concerns/blob_language_from_git_attributes.rb
parent7bbdb2a29fbc7b8c9f879c42de7063adaa8313c7 (diff)
downloadgitlab-ce-3288e1a874ec0184f9f27f932748e51c57babf17.tar.gz
Adds the Rubocop ReturnNil cop
This style change enforces `return if ...` instead of `return nil if ...` to save maintainers a few minor review points
Diffstat (limited to 'app/models/concerns/blob_language_from_git_attributes.rb')
-rw-r--r--app/models/concerns/blob_language_from_git_attributes.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/concerns/blob_language_from_git_attributes.rb b/app/models/concerns/blob_language_from_git_attributes.rb
index 70213d22147..56e1276a220 100644
--- a/app/models/concerns/blob_language_from_git_attributes.rb
+++ b/app/models/concerns/blob_language_from_git_attributes.rb
@@ -5,7 +5,7 @@ module BlobLanguageFromGitAttributes
extend ActiveSupport::Concern
def language_from_gitattributes
- return nil unless project
+ return unless project
repository = project.repository
repository.gitattribute(path, 'gitlab-language')