Skip to content

fix: corrrect RoundBracketAsterisk comment style#272

Merged
wu-sheng merged 1 commit into
apache:mainfrom
bthuilot-forks:bthuilot/fix/round-bracket-asterisk
May 5, 2026
Merged

fix: corrrect RoundBracketAsterisk comment style#272
wu-sheng merged 1 commit into
apache:mainfrom
bthuilot-forks:bthuilot/fix/round-bracket-asterisk

Conversation

@bthuilot
Copy link
Copy Markdown
Contributor

@bthuilot bthuilot commented May 4, 2026

Correct the comment style used by RoundBracketAsterisk in the OCaml language.

For the file main.ml with the contents:

let () = print_endline "Hello, World!"
Current comment style
(* Licensed to the Apache Software Foundation (ASF) under one
(* or more contributor license agreements.  See the NOTICE file
(* distributed with this work for additional information
(* regarding copyright ownership.  The ASF licenses this file
(* to you under the Apache License, Version 2.0 (the
(* "License"); you may not use this file except in compliance
(* with the License.  You may obtain a copy of the License at
(*
(*   http://www.apache.org/licenses/LICENSE-2.0
(*
(* Unless required by applicable law or agreed to in writing,
(* software distributed under the License is distributed on an
(* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
(* KIND, either express or implied.  See the License for the
(* specific language governing permissions and limitations
(* under the License.

let () = print_endline "Hello, World!"
Corrected comment style
(*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 *)

let () = print_endline "Hello, World!"

Signed-off-by: Bryce Thuilot <bryce@thuilot.io>
@wu-sheng wu-sheng requested review from Copilot and kezhenxu94 May 5, 2026 06:37
@wu-sheng wu-sheng added this to the 0.9.0 milestone May 5, 2026
@wu-sheng wu-sheng added the enhancement New feature or request label May 5, 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 pull request corrects the RoundBracketAsterisk comment style used for OCaml (.ml) so generated license headers use a proper multi-line block comment ((* ... *)) rather than starting a new unterminated (* comment on every line.

Changes:

  • Update RoundBracketAsterisk to use middle: ' *' and end: ' *)' (block-comment style).
  • Update OCaml test fixtures to reflect the corrected block comment formatting.
  • Update header rewriting tests to expect the new OCaml header output.

Reviewed changes

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

File Description
assets/styles.yaml Fixes the OCaml comment style definition to produce valid (* ... *) multi-line comments.
pkg/header/fix_test.go Updates the OCaml rewrite-content test expectation to match the new generated header format.
test/testdata/spdx_content_test/testcase.ml Adjusts SPDX OCaml test data to use the corrected block comment wrapper.
test/testdata/include_test/with_license/testcase.ml Adjusts ASF license-header OCaml test data to use the corrected block comment wrapper.

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

@wu-sheng wu-sheng merged commit e910f72 into apache:main May 5, 2026
6 checks passed
@bthuilot bthuilot deleted the bthuilot/fix/round-bracket-asterisk branch May 5, 2026 15:46
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