google / google/addlicense

Different comment styles for .c/.h and .cc files

Open
#200 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
886
Forks
194
PR merge metrics
No merged PRs in 30d

Description

Hello,

I've noticed that `addlicense` generates different comment styles for C/C++ header and source files. Specifically, `.cc` files receive a `//` style header, while `.c` and `.h` files get a `/* ... */` style header.

I'm wondering if this is the intended behavior or a potential bug?

This inconsistency can be problematic for projects that have a strict coding style and require a uniform comment style across all files.

Could you please clarify if this is the intended behavior? If so, would you consider adding an option to configure the comment style for different file extensions?

Thank you for your time and for this useful tool!

Contributor guide

Open the contributing guide

Research direction

Start by locating addlicense's handling for .c, .h, and .cc files and compare how each comment style is selected. Confirm whether the difference is intentional, then define the configuration behavior needed for projects that require a uniform style and verify it across those extensions.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.