Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure hawkeye to update license headers #60

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KushalP
Copy link
Collaborator

@KushalP KushalP commented Feb 6, 2025

You can test this with:

hawkeye check --fail-if-unknown

You can update header comments with:

hawkeye format --fail-if-unknown

Ref: https://github.com/korandoru/hawkeye/

@KushalP KushalP force-pushed the check-licenses branch 3 times, most recently from 7baff43 to 09b7c40 Compare February 6, 2025 19:31
@bioball
Copy link
Contributor

bioball commented Feb 6, 2025

By the way, the experience with hawkeye seems a little rough around the edges, because it takes two commits to format?

  1. Create or update a file, commit
  2. Run hawkeye format, commit

But I think we can go ahead and use it and see how it goes for now.

@KushalP
Copy link
Collaborator Author

KushalP commented Feb 10, 2025

By the way, the experience with hawkeye seems a little rough around the edges, because it takes two commits to format?

This is because you're using attrs.git_file_created_year now, which requires git knowing about the file. It may be possible to change the behaviour of hawkeye to use attrs.git_file_created_year or mtime if it's not in git history yet.

You can test this with:

```
hawkeye check --fail-if-unknown
```

You can update header comments with:

```
hawkeye format --fail-if-unknown
```

Ref: https://github.com/korandoru/hawkeye/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants