Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support multi-line c-style comments #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cfriedt
Copy link

@cfriedt cfriedt commented Jan 24, 2025

Support multi-line C-style comments with minimal, non-grouping regexes that fit with the existing program flow.

This change will allow the existing tool to also match e.g.

/*
 * Copyright (c) 2025 Somebody
 *
 * SPDX-License-Identifier: Apache-2.0
 */

or

/*
 * Copyright (c) 2025 Somebody
 * SPDX-License-Identifier: Apache-2.0
 */

Some projects do not allow the use of c99 / c++ style comments and use exclusively c-style multi-line comments for Copyright and SPDX license identifier.

Support multi-line C-style comments with minimal, non-grouping
regexes that fit with the existing program flow.

This change will allow the existing tool to also match e.g.

```cpp
/*
 * Copyright (c) 2025 Somebody
 *
 * SPDX-License-Identifier: Apache-2.0
 */
```

or

```cpp
/*
 * Copyright (c) 2025 Somebody
 * SPDX-License-Identifier: Apache-2.0
 */
```

Some projects do not allow the use of c99 / c++ style comments
and use exclusively c-style multi-line comments for Copyright
and SPDX license identifier.

Signed-off-by: Chris Friedt <[email protected]>
@cfriedt cfriedt requested a review from a team as a code owner January 24, 2025 00:20
@cfriedt cfriedt requested review from rjzak and removed request for a team January 24, 2025 00:20
@github-actions github-actions bot enabled auto-merge (rebase) January 24, 2025 00:20
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