addlicense icon indicating copy to clipboard operation
addlicense copied to clipboard

Introduce a flag to prefer `//` over `/*...*/`

Open Dentrax opened this issue 3 years ago • 1 comments

It would be great to have a non-multiline comment support enabled with a new flag. Multiline comments /*\n*\n*\n*/ takes more lines and makes it harder to read for me. Here is a simple proposal:

$ touch foo.c
$ addlicense -s=only -c Furkan .

Actual: (Multiline comment)

/*
 * Copyright 2022 Furkan
 * SPDX-License-Identifier: Apache-2.0
 */

New flag way: (comment)

// Copyright 2022 Furkan
// SPDX-License-Identifier: Apache-2.0

Dentrax avatar Nov 19 '22 19:11 Dentrax

I think what I'd really like to do is have a way to specify a config (config file, set of flags, whatever) that can override any default settings of which file extensions are supported, and which commenting style they use. I think there are still some open pull requests for adding file types that I'm not completely convinced should always be updated. But for folks that want it, it should be easy to add that for them.

willnorris avatar Nov 19 '22 19:11 willnorris