Skip to content

Add support for Ruby, ERB and slim#266

Open
afriqs wants to merge 5 commits intoapache:mainfrom
infoPiiaf:filae
Open

Add support for Ruby, ERB and slim#266
afriqs wants to merge 5 commits intoapache:mainfrom
infoPiiaf:filae

Conversation

@afriqs
Copy link
Copy Markdown

@afriqs afriqs commented Mar 16, 2026

@afriqs afriqs marked this pull request as ready for review March 16, 2026 15:28
@wu-sheng wu-sheng requested review from Copilot and kezhenxu94 and removed request for kezhenxu94 March 16, 2026 23:52
@wu-sheng wu-sheng added the enhancement New feature or request label Mar 16, 2026
@wu-sheng wu-sheng added this to the 0.9.0 milestone Mar 16, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_id mappings for Ruby, ERB-containing languages, and Slim in assets/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.

Comment on lines +125 to +127
start: '/'
middle: '/'
end: '/'
Copy link
Copy Markdown
Author

@afriqs afriqs Mar 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 🤷

@kezhenxu94
Copy link
Copy Markdown
Member

Please fix the CI

@wu-sheng wu-sheng requested a review from kezhenxu94 March 19, 2026 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants