-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat: complexity checker plugin #169
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #169 +/- ##
==========================================
- Coverage 73.59% 73.25% -0.34%
==========================================
Files 87 85 -2
Lines 13049 12876 -173
Branches 1228 1201 -27
==========================================
- Hits 9603 9432 -171
+ Misses 3426 3423 -3
- Partials 20 21 +1 ☔ View full report in Codecov by Sentry. |
*/ | ||
maxWarningLevel?: number; | ||
/** If set, maps complexity based on asset or view type */ | ||
assetComplexity?: Record<string, number>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to consider accepting any
as a key so we can assign weights for assets that are registered with more than just a type
, as those might have more complexity than the base asset is, i.e. if { type: 'asset', role: 'enhanced' }
accepts another asset slot than just { type: 'asset' }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this callout - agreed that including other slots than just type to measure asset complexity would provide additional data points, but at this time we're going to keep it simple just to get this out. I've added in TODO comments so that we don't forget about this.
/canary |
2 similar comments
/canary |
/canary |
d451d1d
to
27b1aa2
Compare
/canary |
2 similar comments
/canary |
/canary |
/canary |
this.config = config; | ||
this.typeCount = {}; | ||
this.contentScore = 0; | ||
this.range = { start: 0, end: 0 }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this.range
is assigned a value but I'm not sure I see it ever being used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was being used for FlowNode but since we're not actually doing anything with that (only with Flow State Node), we can remove it?
/canary |
1 similar comment
/canary |
58c17e2
to
f781093
Compare
Addresses #162.
Covers the following scenarios:
This plugin will read out the complexity score per content provided and supports info, warn, and error Diagnostic severities. For more verbose logs,
-v trace
will display a breakdown of what is contributing to the score.Change Type (required)
Indicate the type of change your pull request is:
patch
minor
major
📦 Published PR as canary version:
0.8.2--canary.169.3894
Try this version out locally by upgrading relevant packages to 0.8.2--canary.169.3894
Version
Published prerelease version:
0.9.0-next.2
Changelog
Release Notes
Add options to LSPAssetsPlugin to load from TSManifest via module import (#171)
Allow for loading XLRs to LSP via module imports. Add explicit (optional for now) toggle for distinguishing between module and manifest loading.
🚀 Enhancement
🐛 Bug Fix
Authors: 6