-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move console report #103
Move console report #103
Conversation
9326597
to
dc7d8ea
Compare
dc7d8ea
to
e956db2
Compare
Codecov Report
@@ Coverage Diff @@
## main #103 +/- ##
==========================================
- Coverage 98.41% 94.11% -4.30%
==========================================
Files 17 18 +1
Lines 315 323 +8
==========================================
- Hits 310 304 -6
- Misses 5 19 +14
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuanVqz I like the idea behind this PR, what's the status? Is it ready to be reviewed?
Please let me know. Thanks!
As first step we need to move the console report away of the status reporter class. Related #50
e956db2
to
ca0b319
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuanVqz The changes in this PR break the test suite.
Here are the two failures I see with Ruby 3.2.1:
Fabulous run in 1.387182s, 19.4639 runs/s, 23.7892 assertions/s.
1) Failure:
Skunk::Cli::Application::#execute::when passing --out option with a file#test_0001_writes output to the file [/Users/etagwerker/Projects/fastruby/skunk/test/lib/skunk/application_test.rb:55]:
--- expected
+++ actual
@@ -1,13 +1 @@
-"+---------------------------------------+----------------+------------------+--------------+--------------+--------------+
-| file | skunk_score | churn_times_cost | churn | cost | coverage |
-+---------------------------------------+----------------+------------------+--------------+--------------+--------------+
-| samples/rubycritic/analysed_module.rb | 0.59 | 0.59 | 1 | 0.59 | 100.0 |
-+---------------------------------------+----------------+------------------+--------------+--------------+--------------+
-
-SkunkScore Total: 0.59
-Modules Analysed: 1
-SkunkScore Average: 0.59
-Worst SkunkScore: 0.59 (samples/rubycritic/analysed_module.rb)
-
-Generated with Skunk v0.5.2
-"
+""
2) Error:
Skunk::Cli::Application::#execute::when passing an environment variable SHARE=true#test_0001_share report to default server:
NameError: undefined local variable or method `sorted_modules' for #<Skunk::Command::StatusSharer:0x0000000111aba538 @options={:mode=>nil, :root=>nil, :formats=>[], :deduplicate_symlinks=>nil, :paths=>["samples/rubycritic"], :suppress_ratings=>nil, :minimum_score=>nil, :no_browser=>nil, :base_branch=>nil, :feature_branch=>nil, :threshold_score=>nil, :formatters=>nil, :help_text=>"Usage: skunk [options] [paths]\n -b, --branch BRANCH Set branch to compare\n -o, --out FILE Output report to file\n -v, --version Show gem's version\n -h, --help Show this message\n", :churn_after=>nil, :output_filename=>"tmp/shared_report.txt"}, @status=0, @analysed_modules=#<RubyCritic::AnalysedModulesCollection:0x0000000111c1e820 @modules=[#<RubyCritic::AnalysedModule:0x00000001119976d8 @pathname=#<Pathname:samples/rubycritic/analysed_module.rb>, @coverage=0.0, @name="RubyCritic::AnalysedModule", @smells_count=nil, @file_location=nil, @file_name=nil, @line_count=nil, @smells=[], @churn=5, @committed_at="2021-02-19 15:48:53 -0500", @complexity=14.72, @duplication=0, @methods_count=1, @path="samples/rubycritic/analysed_module.rb", @cost=0.5888, @churn_times_cost=0.59>]>>
/Users/etagwerker/Projects/fastruby/skunk/lib/skunk/cli/commands/status_sharer.rb:61:in `json_results'
/Users/etagwerker/Projects/fastruby/skunk/lib/skunk/cli/commands/status_sharer.rb:71:in `payload'
/Users/etagwerker/Projects/fastruby/skunk/lib/skunk/cli/commands/status_sharer.rb:82:in `post_payload'
/Users/etagwerker/Projects/fastruby/skunk/lib/skunk/cli/commands/status_sharer.rb:24:in `share'
/Users/etagwerker/Projects/fastruby/skunk/lib/skunk/cli/commands/shareable.rb:16:in `share'
/Users/etagwerker/Projects/fastruby/skunk/lib/skunk/cli/application.rb:34:in `execute'
/Users/etagwerker/Projects/fastruby/skunk/test/lib/skunk/application_test.rb:92:in `block (7 levels) in <top (required)>'
27 runs, 33 assertions, 1 failures, 1 errors, 0 skips
rake aborted!
Command failed with status (1)
/Users/etagwerker/Projects/fastruby/skunk/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/Users/etagwerker/.rbenv/versions/3.2.1/bin/bundle:25:in `load'
/Users/etagwerker/.rbenv/versions/3.2.1/bin/bundle:25:in `<main>'
Tasks: TOP => test
(See full trace by running task with --trace)
Closed in favor of #114 |
Related #50
CHANGELOG.md
that links to this PR under the "main (unreleased)" heading.Description:
I'm looking forward implementing the HTML report but as first step we need to move the console report away of the status reporter class.
If changes to the behavior are made, clearly describe what changes.
I will abide by the code of conduct.