whitesmith / whitesmith/rubycritic
Proposal: same report file structure for one- and two-branch runs
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 3.5k
- Forks
- 234
- PR merge metrics
- No merged PRs in 30d
Description
I was thinking about the HTML report file layout again a few days ago (I know, it's a rock n roll life I lead), and I was wondering if there's any reason for putting the files in a different place when running against a single branch vs when doing a compare between two branches, or if that difference is just an artefact of the order the features were originally implemented in.
If the files always went into a directory named after the branch inside a single top-level directory** then I think
(a) it would be possible to generate reports for every branch on your system if you want (in any order and combination of runs), with all the reports going into their own directories instead of overwriting each other, and
(b) once that's working, it should be fairly easy to have it add menu links at the top of each new report it generates for all the branches already on your disk, and
(c) It should also be possible*** to rewrite the menu section of the reports in every branch, every time a new branch is run - so that you can click from the older ones to the newer ones as well.
** Exactly like the compare directory works now, but with a more generic name because it would be used for every run type - branches maybe?
*** Carefully not saying 'easy' for this one; I haven't looked at how that HTML gets generated yet.
Anyway:
- Does this make sense?
- If yes to 1; do you want it? 🙂 Should I take a swing at it? The first bit, initially, although I actually fancy my chances more on the second bit, so if I get the first bit working then I'll probably keep going.
- If 'yes' to 2; would anyone be willing to volunteer as my
phoneemail a friend if I get a bit stuck in the details on this one? Or should I just come and cry on a partial PR at that point? 😃 I think I figured out most of the HTML report file structure stuff for #378, but ... code is tricksy.
Oh, 4. Do I need to think about any of the other report formats, or are they independent enough of each other that I can do the change for HTML without disturbing the rest for now?
Aaaand 5. Ugh. I've just remembered that in #378 I tiptoed around some nasty code without disturbing it - I'm pretty sure I recall global path variables in the near vicinity of this change. Is 'before this' the right time to look at refactoring that to be less fragile/coupled/ugh?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the HTML report file structure and the existing compare-directory behavior, including the code touched by #378. Inspect the nearby global path variables and determine whether the other report formats share this layout. Done means agreeing on a generic top-level directory structure for single- and two-branch HTML runs, with the scope of cross-report menu links and other formats resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100