Skip to content

require-copyright-header should insert as first comment #23

@kerryarchibald

Description

@kerryarchibald

Describe the bug
In files with a comment before any statements or imports,require-copyright-header --fix inserts the header after the first comment.
Eg:
https://github.com/matrix-org/matrix-react-sdk/pull/8514/files/be114d0f6fb571c2a729f771b6e0afe76f90ea20#diff-8a7f360d167712620cbea8af174842a1dd85be4bf184e627c7f054bbea162bb4

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
copyright header should be inserted as the first comment in the file

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions