Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
loki/cmd/fluentd/bin/setup

8 lines
94 B

#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
set -vx
Fix rubocop violation for fluentd/fluent-plugin-loki (#1646) * Don't use sudo to install bundler Follow [the official installation docs](https://github.com/rubygems/bundler#installation-and-usage). * Fix rubocop viloation: kind_of? -> is_a? ``` lib/fluent/plugin/out_loki.rb:76:21: C: Style/ClassCheck: Prefer Object#is_a? over Object#kind_of?. unless @uri.kind_of?(URI::HTTP) or @uri.kind_of?(URI::HTTPS) ^^^^^^^^ ``` * Fix rubocop violation ``` lib/fluent/plugin/out_loki.rb:78:9: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause. end ``` * Fix rubocup violation: or -> || ``` lib/fluent/plugin/out_loki.rb:76:38: C: Style/AndOr: Use || instead of or. unless @uri.is_a?(URI::HTTP) or @uri.is_a?(URI::HTTPS) ^^ ``` * Fix rubocop violation: use single quoate ``` lib/fluent/plugin/out_loki.rb:77:38: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. raise Fluent::ConfigError, "url parameter must be valid HTTP" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` * Ignore rubocop violation: configure method is still not complex Both rubocop and rspec fail with the current codes. Except for this rubocop violation, they were fixed. this cyclomatic complexity violation occurrs in configure method. However, it's still simple and the implementation could be changed during spec fixation. So, this violation should be ignored at this moment. ``` lib/fluent/plugin/out_loki.rb:72:7: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for configure is too high. [7/6] def configure(conf) ... ^^^^^^^^^^^^^^^^^^^ ```
6 years ago
gem install bundler
bundle install