Skip to content

Releases: korandoru/hawkeye

v5.2.0

25 Mar 07:45
v5.2.0
fe8d63c
Compare
Choose a tag to compare

What's Changed

  • build: try workaround workdir in container is not owned by current user by @tisonkun in #118
  • fix: remove file only header should take the last license line by @tisonkun in #119
  • refactor: migrate git2 to gix by @tisonkun in #121
  • ci: bump build-push-action and update docs by @tisonkun in #122
  • ci: add gha smoke test by @tisonkun in #125
  • feat: support .mbt extension for moonbit language by @DiamondMofeng in #124
  • ci: GHA smoke test use local build image by @tisonkun in #127
  • refactor: avoid the GitHelper and instead keep data on the stack by @Byron in #126

New Contributors

Full Changelog: v5.0.1...v5.2.0

v5.0.1

24 Mar 05:06
v5.0.1
abf2a97
Compare
Choose a tag to compare

v5.0.0

24 Mar 01:48
v5.0.0
7546d07
Compare
Choose a tag to compare

Full Changelog: v4.0.5...v5.0.0

Rewrite it in Rust, to fully get rid of the Native Image x Docker Image shit.

So all the JVM related distributions have gone now. Namely the alpha Maven plugin, alpha Gradle plugin, and executable JAR. I suppose that fewer people use these distributions and they can still get it from <=v4.

Docker images are not affected. You can still use:

docker run --rm -v $(pwd):/github/workspace ghcr.io/korandoru/hawkeye-native:v5 format

But now the hawkeye-native image is the same as hawkeye (~28MB).

In addition, you can now install hawkeye via Cargo:

cargo install hawkeye

All the underneath functionality should be the same, except those related to JVM classpath is not a thing now.

It's still possible we distribute this native tool as a Maven plugin / Gradle plugin. Just as Docker written in Golang has the related plugin. But the approach would be quite different and the platform-toolchain classifier is still absent in the Java world, making a challenge to bridge Rust and Java. os-detector may help, but an expose from JVM's reflection would be desired (Not object reflection, I mean, JVM provides APIs to describe itself, including platform, toolchain, and other build/platform info).

Back to HawkEye.

You can use HawkEye in GitHub Actions or in your local machine. HawkEye provides three basic commands:

# check license headers
hawkeye check

# format license headers (auto-fix all files that failed the check)
hawkeye format

# remove license headers
hawkeye remove

You can use -h or --help to list out all config options.

GitHub Actions

The HawkEye GitHub Action enables users to run license header check by HawkEye with a config file.

First of all, add a licenserc.toml file in the root of your project. The simplest config for projects licensed under Apache License 2.0 is as below:

Note The full configurations can be found in the configuration section.

headerPath = "Apache-2.0.txt"

[properties]
inceptionYear = 2023
copyrightOwner = "tison <wander4096@gmail.com>"

You should change the copyright line according to your information.

To check license headers in GitHub Actions, add a step in your GitHub workflow:

- name: Check License Header
  uses: korandoru/hawkeye@v5

Cargo Install

The hawkeye executable can be installed by:

cargo install hawkeye

Docker

Alpine image (~27MB):

docker run -it --rm -v $(pwd):/github/workspace ghcr.io/korandoru/hawkeye check

I'm somewhat rushing in this rewrite so there is still a lot of rooms to improve the experience, performance, and code style. But I'm confident that the most frequent user journey is held and works well.

Enjoy :D

v5.0.0-alpha.5

24 Mar 01:21
v5.0.0-alpha.5
007d274
Compare
Choose a tag to compare
Pre-release

Full Changelog: v4.0.5...v5.0.0-alpha.5

v4.0.5

05 Jan 08:28
v4.0.5
6fab2bf
Compare
Choose a tag to compare

What's Changed

  • fix: heuristic find header - blank lines after first comments should terminate by @tisonkun in #112

Full Changelog: v4.0.4...v4.0.5

v4.0.4

05 Jan 08:28
v4.0.4
7e3a34c
Compare
Choose a tag to compare

What's Changed

Full Changelog: v4.0.3...v4.0.4

v4.0.3

20 Dec 21:34
v4.0.3
f3d978f
Compare
Choose a tag to compare

What's Changed

  • fix: git check-ignore cannot follow symlinks by @tisonkun in #108

Full Changelog: v4.0.2...v4.0.3

v4.0.2

15 Dec 14:11
v4.0.2
e4dd24d
Compare
Choose a tag to compare

What's Changed

Full Changelog: v4.0.1...v4.0.2

v4.0.1

15 Dec 14:11
v4.0.1
25f653e
Compare
Choose a tag to compare

What's Changed

  • fix: git check-ignore should work in Docker by @tisonkun in #105

Full Changelog: v4.0.0...v4.0.1

v4.0.0

15 Dec 14:10
v4.0.0
696d274
Compare
Choose a tag to compare

What's Changed

Full Changelog: v3.6.1...v4.0.0