Skip to content

feat(script): Tech debt metrics generation via ESLint#21276

Closed
rusackas wants to merge 36 commits intomasterfrom
tech-debt-metrics
Closed

feat(script): Tech debt metrics generation via ESLint#21276
rusackas wants to merge 36 commits intomasterfrom
tech-debt-metrics

Conversation

@rusackas
Copy link
Member

@rusackas rusackas commented Aug 31, 2022

SUMMARY

This adds a script that generates a report of technical debt issues we care to track. These tech debt items are added as lint rules in a separate lint config for cleanliness. The script generates a JSON file with rollups/counts of each type of offense, as well as their granular files/lines. Over time, we can use these rollups/files to generate a report/dashboard and track our technical debt over time or enforce that it doesn't grow.

TODO:
We'll keep this stuff on multiple GSheet tabs:

Tab 1: Aggregated stats for all validators (eslint, pylint, whatever...). This will have a schema with the following columns:

  • timestamp
  • rule (e.g. "use typescript")
  • description (rationale, e.g "we moved to Typescript in SIP-X - don't add more javascript!)
  • count

Tab 2-n: Schema depends on the validator, but these will be "shopping lists" of tech debt

  • rule
  • other metadata columns... (depends on validator's needs)

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

npm run lint-stats

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@rusackas rusackas marked this pull request as draft August 31, 2022 20:41
@rusackas rusackas changed the title WIP: Tech debt metrics feat(script): Tech debt metrics generation via ESLint Aug 31, 2022
@codecov
Copy link

codecov bot commented Aug 31, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a23825c) 69.16% compared to head (c44a727) 82.85%.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #21276       +/-   ##
===========================================
+ Coverage   69.16%   82.85%   +13.69%     
===========================================
  Files        1948      520     -1428     
  Lines       76054    36534    -39520     
  Branches     8493        0     -8493     
===========================================
- Hits        52601    30271    -22330     
+ Misses      21273     6263    -15010     
+ Partials     2180        0     -2180     
Flag Coverage Δ
hive 53.68% <ø> (ø)
javascript ?
mysql 78.07% <ø> (ø)
postgres 78.17% <ø> (ø)
presto 53.63% <ø> (ø)
python 82.85% <ø> (ø)
sqlite 77.76% <ø> (ø)
unit 55.86% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@geido geido self-requested a review September 1, 2022 11:29
@rusackas
Copy link
Member Author

rusackas commented Jan 9, 2024

Closing this and starting a fresh branch/PR

@rusackas rusackas closed this Jan 9, 2024
@rusackas rusackas deleted the tech-debt-metrics branch April 16, 2024 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant