Skip to content

Comments

Fix clang-format comment indents on Windows for winml/#17144

Merged
justinchuby merged 6 commits intomainfrom
justinchu/fix-winml-comments
Aug 15, 2023
Merged

Fix clang-format comment indents on Windows for winml/#17144
justinchuby merged 6 commits intomainfrom
justinchu/fix-winml-comments

Conversation

@justinchuby
Copy link
Contributor

@justinchuby justinchuby commented Aug 14, 2023

On Windows, clang-format has a bug when AlignTrailingComments.Kind is set to Leave (https://clang.llvm.org/docs/ClangFormatStyleOptions.html#aligntrailingcomments), where it will keep adding indentation to comments after each formatting runs.

This PR changes to always align comments so we do not hit the bug.

As a consequence of the options change we need to reformat some of the files. Note that this option is aligned with the rest of the repository.

On Windows, clang-format has a bug when AlignTrailingComments.Kind is set to Leave (https://clang.llvm.org/docs/ClangFormatStyleOptions.html#aligntrailingcomments), where it will keep adding indentation to comments after each formatting runs.

This PR changes to always align comments so we do not hit the bug.
@justinchuby justinchuby requested a review from snnn August 14, 2023 13:14
@justinchuby justinchuby changed the title Fix clang-format comment indents on Windows Fix clang-format comment indents on Windows for winml/ Aug 14, 2023
@justinchuby justinchuby marked this pull request as ready for review August 14, 2023 13:15
@justinchuby justinchuby force-pushed the justinchu/fix-winml-comments branch from 9ceb572 to 3e0ccb9 Compare August 14, 2023 13:23
@justinchuby justinchuby requested a review from fdwr August 14, 2023 20:29
Copy link
Contributor

@fdwr fdwr left a comment

Choose a reason for hiding this comment

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

So this fixes the issue Pat observed then 👍. TY. Added one minor comment, but otherwise looks fine to me.

@justinchuby justinchuby merged commit 416dc2e into main Aug 15, 2023
@justinchuby justinchuby deleted the justinchu/fix-winml-comments branch August 15, 2023 03:50
justinchuby added a commit that referenced this pull request Aug 16, 2023
Follow up of #17144. Manually fixed indentation in block comments and
replaced all tabs with spaces.
kleiti pushed a commit to kleiti/onnxruntime that referenced this pull request Mar 22, 2024
On Windows, clang-format has a bug when AlignTrailingComments.Kind is
set to `Leave`
(https://clang.llvm.org/docs/ClangFormatStyleOptions.html#aligntrailingcomments),
where it will keep adding indentation to comments after each formatting
runs.

This PR changes to always align comments so we do not hit the bug.

As a consequence of the options change we need to reformat some of the
files. Note that this option is aligned with the rest of the repository.
kleiti pushed a commit to kleiti/onnxruntime that referenced this pull request Mar 22, 2024
Follow up of microsoft#17144. Manually fixed indentation in block comments and
replaced all tabs with spaces.
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.

3 participants