Skip to content

Commit

Permalink
Merge remote-tracking branch 'qmk/develop' into develop
Browse files Browse the repository at this point in the history
* qmk/develop: (33 commits)
  [Keyboard] Add Keychron Q1 (qmk#13397)
  [Keymap] add kinesis/keymaps/jwon (qmk#13618)
  [Keyboard] Dharma (qmk#13663)
  feature: Add swap hands support for sofle keyboard. (qmk#13654)
  Fix up xd002 rgb keymaps (qmk#13685)
  Avoid LTO conficts on arm_atsam (qmk#13676)
  [Keyboard] Reduce compile size for dz60rgb v2.1 (qmk#13680)
  [Keyboard] Fix type on pandora via keymap (qmk#13681)
  Remove deprecated callbacks for encoders and dip switches (qmk#13404)
  [Keyboard] Quick hack to fix Astro65 board (qmk#13665)
  [Keyboard] Added Compound keyboard support (qmk#12942)
  Disables rgblight twinkle by default. (qmk#13677)
  [Keyboard] Fix split matrix for sekigon grs 70ec (qmk#13672)
  [Keyboard] Fix matrix delay on Drop boards (qmk#13671)
  [Keyboard] Disable console by default on all Keebio boards (qmk#13649)
  CLI/Docs: Fix the format commands' name (qmk#13668)
  [Keyboard] Enable LTO by default on BastardKB Scylla (qmk#13664)
  [Keyboard] Fix symmetric70_proto build break on develop branch (qmk#13667)
  [Keyboard] Remove broken, unmaintained converter/ibm_5291 (qmk#13658)
  [Keyboard] Add model-v keyboard (qmk#13643)
  ...
  • Loading branch information
Carlos Cardoso committed Jul 24, 2021
2 parents 412e2ae + 93fc2cb commit 21ee150
Show file tree
Hide file tree
Showing 210 changed files with 4,396 additions and 2,686 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ jobs:
output: ' '
fileOutput: ' '

- name: Run qmk cformat and qmk pyformat
- name: Run qmk format-c and qmk format-python
shell: 'bash {0}'
run: |
qmk cformat --core-only -n $(< ~/files.txt)
cformat_exit=$?
qmk pyformat -n
pyformat_exit=$?
qmk format-c --core-only -n $(< ~/files.txt)
format_c_exit=$?
qmk format-python -n
format_python_exit=$?
exit $((cformat_exit + pyformat_exit))
exit $((format_c_exit + format_python_exit))
2 changes: 2 additions & 0 deletions common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ endif
SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
SRC += $(QUANTUM_DIR)/led_matrix/led_matrix.c
SRC += $(QUANTUM_DIR)/led_matrix/led_matrix_drivers.c
SRC += $(LIB_PATH)/lib8tion/lib8tion.c
CIE1931_CURVE := yes

ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731)
Expand Down Expand Up @@ -265,6 +266,7 @@ endif
SRC += $(QUANTUM_DIR)/color.c
SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix.c
SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix_drivers.c
SRC += $(LIB_PATH)/lib8tion/lib8tion.c
CIE1931_CURVE := yes
RGB_KEYCODES_ENABLE := yes

Expand Down
25 changes: 18 additions & 7 deletions docs/cli_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,18 @@ qmk clean [-a]

# Developer Commands

## `qmk cformat`
## `qmk format-text`

This command formats text files to have proper line endings.

Every text file in the repository needs to have Unix (LF) line ending.
If you are working on **Windows**, you must ensure that line endings are corrected in order to get your PRs merged.

```
qmk format-text
```

## `qmk format-c`

This command formats C code using clang-format.

Expand All @@ -325,25 +336,25 @@ Run it with `-a` to format all core code, or pass filenames on the command line
**Usage for specified files**:

```
qmk cformat [file1] [file2] [...] [fileN]
qmk format-c [file1] [file2] [...] [fileN]
```

**Usage for all core files**:

```
qmk cformat -a
qmk format-c -a
```

**Usage for only changed files against origin/master**:

```
qmk cformat
qmk format-c
```

**Usage for only changed files against branch_name**:

```
qmk cformat -b branch_name
qmk format-c -b branch_name
```

## `qmk docs`
Expand Down Expand Up @@ -398,14 +409,14 @@ $ qmk kle2json -f kle.txt -f
Ψ Wrote out to info.json
```

## `qmk pyformat`
## `qmk format-python`

This command formats python code in `qmk_firmware`.

**Usage**:

```
qmk pyformat
qmk format-python
```

## `qmk pytest`
Expand Down
4 changes: 2 additions & 2 deletions docs/cli_development.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,15 @@ cli.log.info('Reading from %s and writing to %s', cli.args.filename, cli.args.ou

# Testing, and Linting, and Formatting (oh my!)

We use nose2, flake8, and yapf to test, lint, and format code. You can use the `pytest` and `pyformat` subcommands to run these tests:
We use nose2, flake8, and yapf to test, lint, and format code. You can use the `pytest` and `format-py` subcommands to run these tests:

### Testing and Linting

qmk pytest

### Formatting

qmk pyformat
qmk format-py

## Formatting Details

Expand Down
8 changes: 4 additions & 4 deletions docs/de/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ qmk compile <configuratorExport.json>
qmk compile -kb <keyboard_name> -km <keymap_name>
```

## `qmk cformat`
## `qmk format-c`

Dieser Befehl formatiert C-Code im clang-Format. Benutze ihn ohne Argumente, um den core-Code zu formatieren, oder benutze Namen von Dateien in der CLI, um den Befehl auf bestimmte Dateien anzuwenden.

**Anwendung**:

```
qmk cformat [file1] [file2] [...] [fileN]
qmk format-c [file1] [file2] [...] [fileN]
```

## `qmk config`
Expand Down Expand Up @@ -148,14 +148,14 @@ Dieser Befehl erstellt eine neue Keymap basierend auf einer existierenden Standa
qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
```

## `qmk pyformat`
## `qmk format-py`

Dieser Befehl formatiert Python-Code in `qmk_firmware`.

**Anwendung**:

```
qmk pyformat
qmk format-py
```

## `qmk pytest`
Expand Down
8 changes: 4 additions & 4 deletions docs/fr-fr/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ qmk compile <configuratorExport.json>
qmk compile -kb <keyboard_name> -km <keymap_name>
```

## `qmk cformat`
## `qmk format-c`

Cette commande formatte le code C en utilisant clang-format. Lancez-la sans arguments pour formatter tout le code core, ou passez les noms de fichiers à la ligne de commande pour la lancer sur des fichiers spécifiques.

**Utilisation**:

```
qmk cformat [file1] [file2] [...] [fileN]
qmk format-c [file1] [file2] [...] [fileN]
```

## `qmk config`
Expand Down Expand Up @@ -125,14 +125,14 @@ Cette commande crée une nouvelle keymap basée sur une keymap par défaut d'un
qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
```

## `qmk pyformat`
## `qmk format-py`

Cette commande formate le code python dans `qmk_firmware`.

**Utilisation**:

```
qmk pyformat
qmk format-py
```

## `qmk pytest`
Expand Down
14 changes: 7 additions & 7 deletions docs/ja/cli_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]

# 開発者用コマンド

## `qmk cformat`
## `qmk format-c`

このコマンドは clang-format を使って C コードを整形します。

Expand All @@ -222,25 +222,25 @@ qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
**指定したファイルに対する使い方**:

```
qmk cformat [file1] [file2] [...] [fileN]
qmk format-c [file1] [file2] [...] [fileN]
```

**全てのコアファイルに対する使い方**:

```
qmk cformat -a
qmk format-c -a
```

**origin/master で変更されたファイルのみに対する使い方**:

```
qmk cformat
qmk format-c
```

**branch_name で変更されたファイルのみに対する使い方**:

```
qmk cformat -b branch_name
qmk format-c -b branch_name
```

## `qmk docs`
Expand Down Expand Up @@ -275,14 +275,14 @@ $ qmk kle2json -f kle.txt -f
Ψ Wrote out to info.json
```

## `qmk pyformat`
## `qmk format-py`

このコマンドは `qmk_firmware` 内の python コードを整形します。

**使用法**:

```
qmk pyformat
qmk format-py
```

## `qmk pytest`
Expand Down
4 changes: 2 additions & 2 deletions docs/ja/cli_development.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,15 @@ cli.log.info('Reading from %s and writing to %s', cli.args.filename, cli.args.ou

# テスト、リントおよびフォーマット

nose2、flake8 および yapf を使ってコードをテスト、リントおよびフォーマットします。これらのテストを実行するために `pytest``pyformat` サブコマンドを使うことができます。
nose2、flake8 および yapf を使ってコードをテスト、リントおよびフォーマットします。これらのテストを実行するために `pytest``format-py` サブコマンドを使うことができます。

### テストとリント

qmk pytest

### フォーマット

qmk pyformat
qmk format-py

## フォーマットの詳細

Expand Down
10 changes: 7 additions & 3 deletions docs/ja/feature_encoders.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,18 @@ ENCODER_ENABLE = yes
コールバック関数を `<keyboard>.c` に記述することができます:

```c
void encoder_update_kb(uint8_t index, bool clockwise) {
encoder_update_user(index, clockwise);
bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) {
return false;
}

}
```
あるいは `keymap.c` に記述することもできます:
```c
void encoder_update_user(uint8_t index, bool clockwise) {
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_PGDN);
Expand All @@ -73,6 +76,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_UP);
}
}
return true;
}
```

Expand Down
Loading

0 comments on commit 21ee150

Please sign in to comment.