-
Notifications
You must be signed in to change notification settings - Fork 280
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
Improve reek's default messages #748
Comments
Oh yes please! I’m not sure about the |
Yes! |
@chastell I'd like to finish the UnusedPrivateMethod smell first, would you like to tackle this? |
Sure!
|
Nooooooooooooes. Let's NOT do this. While I an understand the reasoning, considering the smell warning messages themselves would kill all flexibility.
Sounds good!
What in the holy smurf is "pareability"?
👍 |
I wouldn’t consider the smell warning messages changes API-breaking (full agreement here), but I do consider the line number format change API-breaking. While I think people should use JSON or XML formats if they want to parse it, parsing the text output in shell scripts seems like a quite common (and even defendable) use case. Example: I want to have an ASCII bar chart of how many smells there are of each type; the super-quick way to do this is to just pipe I think in Reek 3 we should stick to the
Argh, apologies: parsability, like in the shell example above. :) |
Also, I think it’s beneficial to add the relevant metadata – so rather than switch from |
Good point, agreed.
Ack as well. |
I am working on this, but it seems deciding on just the right format is not simple – for example… …current:
…too minimalist:
…too verbose:
…a good middle-grond?
What do you think? |
I like what you labeled with "too verbose" and I don't think it's too verbose!
You don't read the message here. You just skim it and then are like "oh, right". But for newbie users this is valuable information. Let's go with this. |
I also like the 'too verbose' version. However, I would leave out the brackets since they're just line noise. |
Ok, so what we want to do here is:
I’m a bit lost when it comes to the links, though. Should we add a wiki URL to each line in console output each time, should we keep the current
|
Why? It's not like we're killing the rain forest by eating more RAM, are we?
I'd throw it out completely. Experienced Reek user will just skim messages anyway just like you do it with Ruby. Regarding the URLs: Let's use something like bit.ly and we can clean up the output significantly. |
Ok, agreed.
Hm, I think we can do that no earlier than Reek 4. But maybe we can reverse the default in Reek 3?
I’d really rather not – URL shorteners are both DNS waterboarding, they tend to rot and we don’t have control over them. But if @mvz is for this then I won’t veto. :) One last question – sorry for being so ping-pongish about it, but this change means going through all of our very detailed cucumber scenarios and changing them, so I’d rather do it once ;) – should we sort the output by smell names now? IMHO it would be both much more pleasant to the eye and more useful (as in, ‘I’ll go and fix all of the UnusedParameters today’). |
I'd like to keep I'm for cleaning up the URLs, but would not like to use a shortener. Perhaps we should get an actual website? But again, that's probably for a separate issue. |
Good point, let's not do that.
Kind of depends: Do we consider a change in a non-vital cli switch a breaking change? I'd just go ahead and do it.
Ok, agreed.
But sort within all the smells for one given source, not across all sources, right? If yes then I think that's an awesome idea. |
Probably best to sort the detectors by name in that case. The output will be sorted automatically. |
Ok, one more (ha!): should we sort directly by Going with category first is logically more correct, but I tried it and it’s confusing: ‘why are the smells mostly sorted by name, but not always?’… |
Let's stick with smell_type :) |
Whew, that was a lot of Cucumber features editing. Anyways: #765, and I’m very open to any change proposals (but they may take some time). :) |
I believe our default messages are bad since they are catered to people who kind of know what to do anyway.
I believe right now we are deterring reek beginners - we should make
Reek
so beginner-friendly that my grandmother would fully understand what our error messages mean without special switch by default. OR, and this is what I'm actually suggesting, link to our helpful doc pages right away because I believe that if you have a concise message with a link at the end, most people will click this.E.g. I'd change this:
to:
I talked to quite some
Reek
users recently and believe it or not, almost NOBODY had even realized that we had very helpful doc pages which not only explain the problem, but also often suggest a solution.WDYT?
The text was updated successfully, but these errors were encountered: