Skip to content

Commit

Permalink
Add clang-format check action
Browse files Browse the repository at this point in the history
  • Loading branch information
wengxt committed May 4, 2024
1 parent 3d988ce commit f8c6c64
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@ on:
- master

jobs:
clang-format:
name: Check clang-format
runs-on: ubuntu-latest
container: archlinux:latest
steps:
- name: Cache pacman packages
uses: actions/cache@v4
with:
path: '/var/cache/pacman/pkg'
key: ${{ runner.os }}-pacman
- name: Install dependencies
run: |
pacman -Syu --noconfirm git clang diffutils
git config --global --add safe.directory $GITHUB_WORKSPACE
- uses: actions/checkout@v4
- uses: fcitx/github-actions@clang-format
check:
name: Build and test
runs-on: ubuntu-latest
Expand Down
3 changes: 1 addition & 2 deletions src/lib/fcitx/inputmethodconfig_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ FCITX_CONFIGURATION(
Option<std::string> languageCode{this, "LangCode", "Language Code"};
Option<std::string> addon{this, "Addon", "Addon"};
Option<bool> configurable{this, "Configurable", "Configurable", false};
Option<bool> enable{this, "Enable", "Enable", true};
)
Option<bool> enable{this, "Enable", "Enable", true};)

FCITX_CONFIGURATION(InputMethodInfo, Option<InputMethodInfoBase> im{
this, "InputMethod", "Input Method"};)
Expand Down
5 changes: 3 additions & 2 deletions src/lib/fcitx/instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -974,8 +974,9 @@ Instance::Instance(int argc, char **argv) {
#ifdef ENABLE_KEYBOARD
if (keyEvent.forward()) {
FCITX_D();
// Always let the release key go through, since it shouldn't produce character.
// Otherwise it may wrongly trigger wayland client side repetition.
// Always let the release key go through, since it shouldn't
// produce character. Otherwise it may wrongly trigger wayland
// client side repetition.
if (keyEvent.isRelease()) {
keyEvent.filter();
return;
Expand Down

0 comments on commit f8c6c64

Please sign in to comment.