Skip to content

Reflect nested config files when walking directories #106

@radeksimko

Description

@radeksimko

When a repository uses a mix of different licenses for different parts/directories (BUSL or MPL), then it is currently necessary to run copywrite in those nested directories in order for it to notice those nested directories.

For example, Terraform uses the following script to work around this limitation:

https://github.com/hashicorp/terraform/blob/2a5ff48e3d0342c1978adf97c63414fa06c8b9ed/scripts/copyright.sh#L12-L17

directories=$(find . -type f -name '.copywrite.hcl' -execdir pwd \;)

for dir in $directories; do
    cd $dir && go run github.com/hashicorp/copywrite headers
done

It would be great if this could be built into the tool, so we would not have to maintain this shell wrapper.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions