librime icon indicating copy to clipboard operation
librime copied to clipboard

Format with clang-foramt 18.1

Open Bambooin opened this issue 2 years ago • 1 comments

Pull request

Issue tracker

Fixes will automatically close the related issue

Fixes #

Feature

Describe feature of pull request

Format code with clang-format 18.1.

It's hard for Homebrew to pin or install the older version formula.

Maybe we can use other solution to install specific clang-format version?

Unit test

  • [x] Done

Manual test

  • [x] Done

Code Review

  1. Unit and manual test pass
  2. GitHub Action CI pass
  3. At least one contributor reviews and votes
  4. Can be merged clean without conflicts
  5. PR will be merged by rebase upstream base

Additional Info

Bambooin avatar Mar 07 '24 13:03 Bambooin

Yes, you are right, I have this issue in my local macOS with clang-format 18.

In local homebrew, the clang-format is 18.1.2 right now.

$ brew info clang-format
==> clang-format: stable 18.1.2 (bottled), HEAD

Due to homebrew is hard to install old version: https://github.com/orgs/Homebrew/discussions/155

I wondered that we should install and pin with clang-format 17 in https://apt.llvm.org/

But this will make developers on macOS unhapppy, if we always follow the latest clang-format, it will make developers on other platforms unhappy too.

Any better idea are welcome.

Bambooin avatar Mar 20 '24 13:03 Bambooin