Skip to content
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

Fixed laborHours Calculations #203

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

sachin-panayil
Copy link
Contributor

Fixed laborHours Calculations

Problem

Overall, labor_hour value is pretty high because it is taking into account the markdown files. We would like to exclude this from the calculation.

Solution

Included a flag in the scc command that excludes md files.

Result

A decrease in laborHours

Before

Screenshot 2024-11-07 at 5 22 28 PM

After

Screenshot 2024-11-07 at 5 20 34 PM

Some important notes regarding the summary line:

Test Plan

Tested locally and each tier showed a decrease in labor hours

Signed-off-by: Sachin Panayil <[email protected]>
Copy link
Collaborator

@IsaacMilarky IsaacMilarky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is on the right track but I think we should be more specific in what we exclude.

scc supports adding a .sccignore file in the same way that .gitignore works: https://github.com/boyter/scc?tab=readme-ov-file#ignore-files

Preferably, we would exclude all changes before a specific commit or something but I don't think that that is supported by scc.

@sachin-panayil
Copy link
Contributor Author

@IsaacMilarky one of my approaches was to use the .sccignore file but for some reason the laborHours value wasnt changing. I will take another crack at it tho using .sccignore incase i used it improperly.

if the above issue persists then maybe we can have an array of files we want to exclude and pipe that into the command with the current method

@IsaacMilarky
Copy link
Collaborator

if the above issue persists then maybe we can have an array of files we want to exclude and pipe that into the command with the current method

That's fair if the .sccignore method isn't working we should file an issue on scc.

Signed-off-by: Sachin Panayil <[email protected]>
Copy link
Collaborator

@IsaacMilarky IsaacMilarky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the --exclude-file option instead of the --exclude-ext option? That way we won't exclude all of the additional docs work a project is doing. It's good to know if a project is providing docs and analyze the work in that.

If there are problems with that option we can talk about it more this week.

Signed-off-by: Sachin Panayil <[email protected]>
@sachin-panayil
Copy link
Contributor Author

this new method reduces laborHour bloat significantly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants