Skip to content

Comments

Testing: add GitHub action to enforce multi-line style comments#127

Merged
rlm2002 merged 1 commit intowolfSSL:masterfrom
cconlon:ghActionCommentStyle
Jul 16, 2025
Merged

Testing: add GitHub action to enforce multi-line style comments#127
rlm2002 merged 1 commit intowolfSSL:masterfrom
cconlon:ghActionCommentStyle

Conversation

@cconlon
Copy link
Member

@cconlon cconlon commented Jul 14, 2025

This PR adds a GitHub action that checks to make sure new code uses multi-line comment style (ie: /* */) not single line style (ie: //), to match internal coding standards.

Only checks .java, .c, and .h source files changed in a PR.

Example of a failure run: https://github.com/wolfSSL/wolfcrypt-jni/actions/runs/16276508001/job/45956586842?pr=127

@cconlon cconlon self-assigned this Jul 14, 2025
@cconlon cconlon changed the title Testing: add GitHub action to make sure PRs are using multiline comme… Testing: add GitHub action to enforce multi-line style comments Jul 14, 2025
@cconlon cconlon force-pushed the ghActionCommentStyle branch 2 times, most recently from 7ecd073 to 687d176 Compare July 14, 2025 19:52
@cconlon cconlon requested a review from Copilot July 14, 2025 19:52
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

Adds a GitHub Action that enforces using multi-line (/* */) comments instead of single-line (//) in .java, .c, and .h files.

  • Introduces a CI workflow that lists changed files, filters by extension, and greps for //-style comments.
  • Fails the check with an error message if any single-line comments are detected.
  • Skips the check if no relevant source files were modified.
Comments suppressed due to low confidence (1)

.github/workflows/comment-style-check.yml:21

  • [nitpick] The comment refers to '.c/.h' using a slash; consider rephrasing to list extensions explicitly (e.g., '.java, .c, and .h') to improve readability.
          # Get list of changed .java and .c/.h files in this PR

@cconlon cconlon force-pushed the ghActionCommentStyle branch from 687d176 to 3397110 Compare July 14, 2025 19:55
…nts, not single line style. Helps us meet coding standards.
@rlm2002 rlm2002 merged commit b9fe206 into wolfSSL:master Jul 16, 2025
78 of 79 checks passed
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.

4 participants