-
Notifications
You must be signed in to change notification settings - Fork 1
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(build): new script that generate extended component files for wca
to be able to analyze #85
#86
feat(build): new script that generate extended component files for wca
to be able to analyze #85
#86
Conversation
Reviewer's Guide by SourceryThis PR introduces a new build script that generates extended component files specifically for Web Component Analyzer (WCA) analysis. The implementation consists of two main files: a script to process and write the extended components, and a template generator for the extended component code. Class diagram for extended component generation scriptclassDiagram
class ExtendedComponentWriter {
+globPath(sources)
+createExtendsFile(filePaths)
+main()
}
class ExtendedComponentTemplate {
+default(code, sourcePath)
}
ExtendedComponentWriter --> ExtendedComponentTemplate : uses
note for ExtendedComponentWriter "Handles file processing and writing"
note for ExtendedComponentTemplate "Generates extended component code"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @sun-mota - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider making the regex patterns in extendedComponentTemplate.mjs more robust and add error messaging for when they don't match the expected patterns
- Error handling approach is inconsistent between functions - globPath() re-throws while createExtendsFile() fails silently. Consider standardizing the error handling approach
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@sourcery-ai review |
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.
Hey @sun-mota - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider enhancing error handling with more specific error messages and context, especially in createExtendsFile() for file operations.
- The regex patterns in extendedComponentTemplate.mjs could be more robust - consider adding validation for extracted values and handling edge cases where the patterns don't match.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
I think your file names should be a little more specific. Saying "Component Writer" and Component Template" does not really tell me what these files are used for.
b37d58a
to
6fff53c
Compare
610d4c3
to
038dc93
Compare
…ca` to be able to analyze #85
…e` and make it to add class description comment
038dc93
to
0e3f0f3
Compare
Alaska Airlines Pull Request
#85
This PR is to create new script that generate extended component files for
wca
to be able to analyzeTested on
Auro-flight
This change is a part of AlaskaAirlines/auro-flight#139
By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I have performed a self-review of my own update.
Summary by Sourcery
Add a new build script to generate extended component files for
wca
analysis, facilitating the analysis of components by creating necessary files automatically.New Features:
wca
analysis.Build:
extendedComponentWriter.mjs
to automate the creation of extended component files forwca
.