-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add support for Twig and Nunjucks #8
Conversation
Included `.twig` file detection and added tests for obsolete elements within Twig templates. This enhances the tool's capability to handle and inspect more file types. Signed-off-by: Jens Oliver Meiert <[email protected]>
Updated the README to reflect the addition of Nunjucks and Twig file scanning. This enhances the script’s capability to identify deprecated HTML within these templating languages. Signed-off-by: Jens Oliver Meiert <[email protected]>
Update the package and lock file versions from 1.5.0 to 1.6.0. This change ensures alignment across the project files and prepares for the next release. Signed-off-by: Jens Oliver Meiert <[email protected]>
Added a check to ensure that the 'nowrap' attribute is not incorrectly flagged as obsolete in test cases. This increases the reliability of the ObsoHTML script and ensures more accurate detection of obsolete HTML attributes. Signed-off-by: Jens Oliver Meiert <[email protected]>
WalkthroughThe recent updates enhance the ObsoHTML tool by expanding its capability to identify obsolete HTML elements and attributes in additional templating languages, specifically Nunjucks and Twig. The enhancements include changes to the script's file processing logic and the introduction of new test cases to validate these improvements. The version number in the package has also been incremented, reflecting these notable additions and improvements. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
package-lock.json
is excluded by!**/package-lock.json
Files selected for processing (4)
- README.md (1 hunks)
- bin/obsohtml.js (1 hunks)
- bin/obsohtml.test.js (3 hunks)
- package.json (1 hunks)
Files skipped from review due to trivial changes (2)
- README.md
- package.json
Additional comments not posted (5)
bin/obsohtml.test.js (4)
10-10
: Addition oftempTwigFile
for Twig testing.The addition of
tempTwigFile
is appropriate for testing Twig files. Ensure that the directory and file creation logic is robust.
20-20
: Ensure content accuracy for Twig file.The content of
tempTwigFile
includes the<isindex>
element, which is obsolete. This setup is correct for testing purposes.
28-28
: Cleanup oftempTwigFile
.The cleanup process correctly includes the removal of
tempTwigFile
. This ensures no residual test artifacts remain.
62-64
: New test for detecting obsolete elements in Twig files.The test case for detecting obsolete elements in Twig files is well-implemented. It complements the existing test suite by expanding coverage to Twig templates.
bin/obsohtml.js (1)
81-81
: Expanded file type support inwalkDirectory
.The addition of
.njk
and.twig
to the list of file extensions broadens the scope of the script effectively. This change aligns with the PR objectives to support Twig and Nunjucks.
Summary by CodeRabbit
New Features
Tests
Chores