You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bundle exec rake spec creates the following violation messages and errors
bundle exec rake spec
Running RuboCop...
.rubocop.yml: Metrics/LineLength has the wrong namespace - should be Layout
Inspecting 7 files
....C..
Offenses:
lib/fluent/plugin/out_loki.rb:72:7: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for configure is too high. [7/6]
def configure(conf) ...
^^^^^^^^^^^^^^^^^^^
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)
^^^^^^^^
lib/fluent/plugin/out_loki.rb:76:41: C: Style/AndOr: Use || instead of or.
unless @uri.kind_of?(URI::HTTP) or @uri.kind_of?(URI::HTTPS)
^^
lib/fluent/plugin/out_loki.rb:76:49: C: Style/ClassCheck: Prefer Object#is_a? over Object#kind_of?.
unless @uri.kind_of?(URI::HTTP) or @uri.kind_of?(URI::HTTPS)
^^^^^^^^
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"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/fluent/plugin/out_loki.rb:78:9: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
end
^^^
7 files inspected, 6 offenses detected
Even if we ignore the robocop by comment out Rakefile like
# frozen_string_literal: true
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'rubocop/rake_task'
# comment out this line
#RuboCop::RakeTask.new(:spec)
RSpec::Core::RakeTask.new(:spec)
task default: :spec
bundle exec rake spec fails due to the following errors
bundle exec rake spec
/Users/takayuki-watanabe/.rbenv/versions/2.6.5/bin/ruby -I/Users/takayuki-watanabe/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rspec-core-3.9.1/lib:/Users/takayuki-watanabe/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rspec-support-3.9.2/lib /Users/takayuki-watanabe/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rspec-core-3.9.1/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
An error occurred while loading spec_helper.
Failure/Error: require 'fluent/plugin/output'
NoMethodError:
undefined method `windows?' for Fluent:Module
# ./lib/fluent/plugin/out_loki.rb:18:in `require'
# ./lib/fluent/plugin/out_loki.rb:18:in `<top (required)>'
# ./spec/spec_helper.rb:7:in `require'
# ./spec/spec_helper.rb:7:in `<top (required)>'
No examples found.
No examples found.
Finished in 0.00002 seconds (files took 0.80014 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples
Finished in 0.00002 seconds (files took 0.80014 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples
/Users/takayuki-watanabe/.rbenv/versions/2.6.5/bin/ruby -I/Users/takayuki-watanabe/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rspec-core-3.9.1/lib:/Users/takayuki-watanabe/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rspec-support-3.9.2/lib /Users/takayuki-watanabe/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rspec-core-3.9.1/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed
Expected behavior
bundle exec rake spec succeeds without violations and errors
According to the Slack comment, this directory isn't well maintained. I'm not sure who could run spec with the current master code.
In addition, there are no Gemfile.lock and .ruby-version(ruby version info). It's hard to develop this plugin without documentation and testable specs.
The text was updated successfully, but these errors were encountered:
This issue is ongoing 💨 could you reopen this issue so I can put all the information here? I'm planning to fix broken specs and introduce CI. Otherwise, this plugin won't be maintained.
This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
stalebot
added
the
stale
A stale issue or PR that will automatically be closed.
label
Mar 8, 2020
Describe the bug
https://github.com/grafana/loki/tree/master/fluentd/fluent-plugin-grafana-loki is not well maintained and hard to debug because,
To Reproduce
Steps to reproduce the behavior:
bin/setup
bundle exec rake spec
creates the following violation messages and errorsEven if we ignore the robocop by comment out
Rakefile
likebundle exec rake spec
fails due to the following errorsExpected behavior
bundle exec rake spec
succeeds without violations and errorsEnvironment:
Comment
Are we sure that the docs written in the development section are correct? (https://github.com/grafana/loki/tree/master/fluentd/fluent-plugin-grafana-loki#development). If not I want to refactor this directory.
According to the Slack comment, this directory isn't well maintained. I'm not sure who could run spec with the current master code.
In addition, there are no
Gemfile.lock
and.ruby-version
(ruby version info). It's hard to develop this plugin without documentation and testable specs.The text was updated successfully, but these errors were encountered: