Skip to content

Comments

Remove trailing whitespace from comments and update test output#11

Open
davispuh wants to merge 2 commits intoMVV90:mainfrom
davispuh:whitespace
Open

Remove trailing whitespace from comments and update test output#11
davispuh wants to merge 2 commits intoMVV90:mainfrom
davispuh:whitespace

Conversation

@davispuh
Copy link

@davispuh davispuh commented Feb 2, 2026

This PR removes trailing whitespace for created comments.
Previously it was # @return [Integer] (with at the end). This removes that.
After applying #9 #10 I've updated test outputs aswell. Not sure how good idea is to commit those but that's how it's been done before.

Copilot AI review requested due to automatic review settings February 2, 2026 18:23
Copy link

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 removes trailing whitespace from generated comments in the FFI generator output. Previously, comments like # @return [Integer] (with a trailing space) are now generated as # @return [Integer] (without the trailing space). The changes also update test output files to reflect the corrected formatting after applying related PRs #9 and #10.

Changes:

  • Modified the write_array method in the Writer class to conditionally add spacing between prefixes and entries
  • Updated all test output files to remove trailing whitespace from comments and blank comment lines

Reviewed changes

Copilot reviewed 88 out of 95 changed files in this pull request and generated no comments.

Show a summary per file
File Description
lib/ffi_generator/generators/from_c_generator/writer.rb Updated write_array method to intelligently handle spacing between prefixes and content
test/output/llvm-c/Transforms/Scalar.rb Removed trailing whitespace from comments throughout the file
test/output/llvm-c/Transforms/PassManagerBuilder.rb Removed trailing whitespace from comments throughout the file
test/output/llvm-c/Transforms/IPO.rb Removed trailing whitespace from comments throughout the file
test/output/llvm-c/Target.rb Removed trailing whitespace from comments throughout the file
test/output/llvm-c/Object.rb Removed trailing whitespace from comments throughout the file
test/output/llvm-c/LinkTimeOptimizer.rb Removed trailing whitespace from comments throughout the file
test/output/llvm-c/Initialization.rb Removed trailing whitespace from comments throughout the file
test/output/llvm-c/Disassembler.rb Removed trailing whitespace from comments throughout the file
test/output/llvm-c/BitWriter.rb Removed trailing whitespace from comments throughout the file
test/output/llvm-c/BitReader.rb Removed trailing whitespace from comments throughout the file
test/output/llvm-c/Analysis.rb Removed trailing whitespace from comments throughout the file
test/output/include/internal/cef_*.rb Removed trailing whitespace from comments across multiple CEF internal header files
test/output/include/capi/cef_*.rb Removed trailing whitespace from comments across multiple CEF CAPI files
test/output/cairo-*.rb Removed trailing whitespace from comments across multiple Cairo binding files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant