Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds comment-style and test coverage to support applying Apache license headers to Ruby (.rb), ERB (.erb / .js.erb), and Slim (.slim) files within the skywalking-eyes header tooling.
Changes:
- Add new comment styles for ERB (
<% ... %>wrapping with#lines) and Slim (single/line comments). - Wire new/updated
comment_style_idmappings for Ruby, ERB-containing languages, and Slim inassets/languages.yaml. - Extend header fixing tests and add include-test fixtures for Ruby/ERB/Slim with and without license headers.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
assets/styles.yaml |
Adds ERB and Slim comment-style definitions used by header generation/fixing. |
assets/languages.yaml |
Maps Ruby / ERB languages and Slim to the new/existing comment styles. |
pkg/header/fix_test.go |
Adds fix/insert expectations for Ruby (with/without shebang), ERB, and Slim. |
test/testdata/include_test/** |
Adds new fixture files for header check tests across Ruby/ERB/Slim. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
assets/styles.yaml
Outdated
Comment on lines
+125
to
+127
| start: '/' | ||
| middle: '/' | ||
| end: '/' |
Author
There was a problem hiding this comment.
Is this a a char or a regexp? Others only seem to be chars and not regexp but it fails with a regexp see https://github.com/apache/skywalking-eyes/actions/runs/23291104829/job/67726951492?pr=266#step:6:940 🤷
Member
|
Please fix the CI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See apache/skywalking#7744 😅