skunk icon indicating copy to clipboard operation
skunk copied to clipboard

[REQUEST] Skunk Score should be a "GPA score"-like letter based on a 0-100 scale

Open etagwerker opened this issue 3 years ago • 3 comments

Before we start...:

  • [x] I checked the documentation and didn't find this feature
  • [x] I checked to make sure that this feature has not already been requested

Branch/Commit:

main branch.

Describe the feature:

As a new user I want to run skunk So that I can see a list of GPA scores per file

Problem:

As a new user I run skunk And then I see a list of skunk scores And I don't understand if my app is in great shape or horrible shape

Current:

+-----------------------------------------------------+----------------------------+----------------------------+----------------------------+----------------------------+----------------------------+
| file                                                | skunk_score                | churn_times_cost           | churn                      | cost                       | coverage                   |
+-----------------------------------------------------+----------------------------+----------------------------+----------------------------+----------------------------+----------------------------+
| lib/skunk/cli/commands/default.rb                   | 166.44                     | 1.6643999999999999         | 3                          | 0.5548                     | 0                          |
| lib/skunk/cli/application.rb                        | 139.2                      | 1.392                      | 3                          | 0.46399999999999997        | 0                          |
| lib/skunk/cli/command_factory.rb                    | 97.6                       | 0.976                      | 2                          | 0.488                      | 0                          |
| test/test_helper.rb                                 | 75.2                       | 0.752                      | 2                          | 0.376                      | 0                          |
| lib/skunk/rubycritic/analysed_module.rb             | 48.12                      | 1.7184                     | 2                          | 0.8592                     | 72.72727272727273          |
| test/lib/skunk/cli/commands/status_reporter_test.rb | 45.6                       | 0.456                      | 1                          | 0.456                      | 0                          |
| lib/skunk/cli/commands/base.rb                      | 29.52                      | 0.2952                     | 3                          | 0.0984                     | 0                          |
| lib/skunk/cli/commands/status_reporter.rb           | 8.0                        | 7.9956                     | 3                          | 2.6652                     | 100.0                      |
| test/lib/skunk/rubycritic/analysed_module_test.rb   | 2.63                       | 2.6312                     | 2                          | 1.3156                     | 100.0                      |
| lib/skunk.rb                                        | 0.0                        | 0.0                        | 2                          | 0.0                        | 0                          |
| lib/skunk/cli/options.rb                            | 0.0                        | 0.0                        | 2                          | 0.0                        | 0                          |
| lib/skunk/version.rb                                | 0.0                        | 0.0                        | 2                          | 0.0                        | 0                          |
| lib/skunk/cli/commands/help.rb                      | 0.0                        | 0.0                        | 2                          | 0.0                        | 0                          |
+-----------------------------------------------------+----------------------------+----------------------------+----------------------------+----------------------------+----------------------------+

Proposed:

+-----------------------------------------------------+----------------------------+----------------------------+----------------------------+----------------------------+----------------------------+
| file                                                | skunk_score                | churn_times_cost           | churn                      | cost                       | coverage                   |
+-----------------------------------------------------+----------------------------+----------------------------+----------------------------+----------------------------+----------------------------+
| lib/skunk/cli/commands/default.rb                   | F (7/100)                     | 1.6643999999999999         | 3                          | 0.5548                     | 0                          |
| lib/skunk/cli/application.rb                        | D (47/100)                      | 1.392                      | 3                          | 0.46399999999999997        | 0                          |
| lib/skunk/cli/command_factory.rb                    | A (93/100)                       | 0.976                      | 2                          | 0.488                      | 0                          |

I will abide by the code of conduct

etagwerker avatar May 18 '22 17:05 etagwerker

Do we have any idea what threshold score to apply to each GPA score? Rubycritic uses the score and assigns ratings like this

fbuys avatar Oct 09 '25 21:10 fbuys

We have some historical data over here: https://skunk.fastruby.io

You will need to use the heroku console to access the data you want to get a reference.

etagwerker avatar Oct 10 '25 00:10 etagwerker

We have some historical data over here: https://skunk.fastruby.io

You will need to use the heroku console to access the data you want to get a reference.

@fbuys I'll be interested in helping you check this data and getting some GPA scores around them. let me know when you can do it...

JuanVqz avatar Oct 14 '25 20:10 JuanVqz