google / google/addlicense

Copyright line should append after the SPDX identifier

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

Description

I just tried SPDX flag first time and noticed addlicense adds _copyright_ line before the SPDX identifier.

```
$ addlicense -s=only -c Furkan .
```

Actual:
```
Copyright ...
SPDX-License-Identifier:
```

My expectation according to other open source projects, solidity, etc.:
```
SPDX-License-Identifier:
Copyright ...
```

Any ways to reorder of those? Shouldn't the right way is the bottom one?

Contributor guide

Open the contributing guide

Research direction

Start by tracing the addlicense command with the -s=only flag through the header-generation logic. Confirm how the SPDX identifier and copyright line are ordered, then verify that generated headers consistently place SPDX first and copyright second.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.