MaibornWolff / MaibornWolff/codecharta

Fix weird behavior with minified files

Open
#4,120 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
529
Forks
56
Avg merge
7h 17m
Merged PRs (30d)
34

Description

# Feature request

Minified files are not visible in CodeCharta, because they are only a single line. They still contain a lot of complexity of course and it's weird that they are even commited to the code base. It would be nice to see them. I haven't the foggiest idea how to show them but I wanted to point it out.

## Description

Take the [forty theme](https://github.com/andrewbanchich/Forty-Jekyll-Theme) for Jekyll. When you analyze it with the unifiedparser, it looks like this:

Image

Notice that 8 files are in the file but only two are visible.

If we now exclude "!*.min.js", then suddenly a lot becomes visible:

Image

Notice that jquery has an rloc of 1, but a complexity of 2612.

I am aware that this is an edge-case. It would be helpful to have an indication that files with a small size metric have an enormous height though. It would also be great to know if Sonar actually gives these files an ncloc or if it also defaults to 1.

## Acceptance criteria
- Check if you can add an indication that something is hidden (i.e. size~1) but has a height/color metric higher than the average of the other buildings. E.g. if the average height is 50, then invisible files with a height larger than 50 should be indicated.
- Check that sonar+sonarimporter does not assign these .min.js files a height.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the Forty Jekyll Theme example with the unifiedparser, including and excluding !*.min.js, and inspect how the resulting building metrics are displayed. Check the sonar+sonarimporter output for .min.js files, then determine whether high-height, low-size files can be indicated; done means the acceptance criteria are verified and the behavior is covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.