summaryrefslogtreecommitdiff
path: root/scripts/lint-rugged
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
committerToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
commit62d7990b9bb30cf33ed87017c5c633d1cccc75c2 (patch)
treec3e1b69c58a412ba1c6f50a0337a23d9f9d6e1a4 /scripts/lint-rugged
parentf6453eca992a9c142268e78ac782cef98110d183 (diff)
downloadgitlab-ce-tc-standard-gem.tar.gz
Ran standardrb --fix on the whole codebasetc-standard-gem
Inspired by https://twitter.com/searls/status/1101137953743613952 I decided to try https://github.com/testdouble/standard on our codebase. It's opinionated, but at least it's a _standard_.
Diffstat (limited to 'scripts/lint-rugged')
-rwxr-xr-xscripts/lint-rugged10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/lint-rugged b/scripts/lint-rugged
index 22e3e1f1505..6cdb055d0ff 100755
--- a/scripts/lint-rugged
+++ b/scripts/lint-rugged
@@ -2,19 +2,19 @@
ALLOWED = [
# Needed to handle repositories that are not in any storage
- 'lib/gitlab/bare_repository_import/repository.rb',
+ "lib/gitlab/bare_repository_import/repository.rb",
# Needed to avoid using the git binary to validate a branch name
- 'lib/gitlab/git_ref_validator.rb'
+ "lib/gitlab/git_ref_validator.rb",
].freeze
rugged_lines = IO.popen(%w[git grep -i -n rugged -- app config lib], &:read).lines
rugged_lines = rugged_lines.select { |l| /^[^:]*\.rb:/ =~ l }
rugged_lines = rugged_lines.reject { |l| l.start_with?(*ALLOWED) }
-rugged_lines = rugged_lines.reject do |line|
- code, _comment = line.split('# ', 2)
+rugged_lines = rugged_lines.reject { |line|
+ code, _comment = line.split("# ", 2)
code !~ /rugged/i
-end
+}
exit if rugged_lines.empty?