Commit Graph

21 Commits (7b8cdfc19def74a982a842a5131c011ee23b024a)

Author SHA1 Message Date
Zach White 4ab8734d6e
Move all our CLI file formatters to the format dir (#13296)
* move all our file formatters to the format dir

* Apply suggestions from code review

Co-authored-by: Erovia <Erovia@users.noreply.github.com>

Co-authored-by: Erovia <Erovia@users.noreply.github.com>
2021-07-20 11:52:14 -07:00
Zach White db1eacdaac
Align our subprocess usage with current best practices. (#12940)
* Align our subprocess usage with current best practices.

* remove unused import

* Apply suggestions from code review

Co-authored-by: Ryan <fauxpark@gmail.com>

* fix the cpp invocation for older python

* allow for unprompted installation

* make sure qmk new-keyboard works on windows

Co-authored-by: Ryan <fauxpark@gmail.com>
2021-05-19 15:24:46 -07:00
Erovia 3023015c5b
Make sure 'cformat' only runs on core files (#12909)
Co-authored-by: Zach White <skullydazed@drpepper.org>
2021-05-18 21:26:17 +02:00
Zach White a3e7f3e7c5
Improve our CI tests (#11476)
* add a test and dry-run to qmk generate-api

* add a dry-run to qmk pyformat

* Add a --dry-run to qmk cformat

* reverse the order of nose2 and flake8 tests

* run CI test against cformat and pyformat

* fix programming errors

* tweak job name

* fix argument

* refine the files we select

* fix stack trace in --ci

* make cformat exit clean

* fix c file extensions

* decouple CI from pyformat

* remove --ci arg

* make ci happy

* use the environment var instead

* change output to text

* fix log message

* replace tabs
2021-05-10 11:18:44 -07:00
Zach White 588bcdc8ca
Add support for tab completion (#12411)
* Add support for tab completion

* make flake8 happy

* Add documentation
2021-04-14 19:00:22 -07:00
github-actions[bot] 8a950a7116
Format code according to conventions (#12437)
Co-authored-by: QMK Bot <hello@qmk.fm>
2021-03-31 10:16:14 +11:00
Nick Brassel 64551a8386
Allow for clang-format up to v20. (#12407) 2021-03-31 09:33:26 +11:00
Joel Challis 5b5d74a267
Fix warning logic when running 'qmk format -a' (#11177) 2020-12-10 19:02:41 +00:00
Nick Brassel 385d49cc39 Initial work for consolidation of ChibiOS platform files (#8327)
* Initial work for consolidation of board files and default ChibiOS configs.

* Migrate F401/F411 black pills for testing.

* Add early init bootloader jump flag.

* Add support for I2C in order to use i2c_scanner keymap.

* Add F401/F411 HSE bypass to get things booting.

* Exempt "hooked" ChibiOS conf files from updater script.

* Fix up ordering for bootloader_defs file check.

* Match previous $(KEYBOARD_PATHS) value for Proton-C, updated for all board configs.
2020-08-29 14:30:02 -07:00
Zach White 751316c344
[CLI] Add a subcommand for getting information about a keyboard (#8666)
You can now use `qmk info` to get information about keyboards and keymaps.

Co-authored-by: Erovia <Erovia@users.noreply.github.com>
2020-05-26 13:05:41 -07:00
skullydazed 66d94dc22a
Move everything to Python 3.6 (#8835) 2020-04-18 22:00:56 +02:00
Erovia 38f14c4174 Don't hide for devs... 2020-04-08 09:31:14 -07:00
Erovia 5cfc3ce02e Rebase on master, hide some other subcommands
The list of hidden subcommands were approved by @skullydazed ;)
Currently hidden if 'user.developer' is not True:

  - cformat
  - docs
  - kle2json
  - pyformat
  - pytest
2020-04-08 09:31:14 -07:00
Akaash Suresh b353028ea5
New functionality for cformat (#7893)
Fixing complexity

remove lambda

PR review fixes #1

Removing unneccesary string substitution

Handle -a and specified files

Complexity rewrite, use pathlib
2020-02-22 20:57:19 -08:00
Joel Challis 5b91c3e0a0
Fix cformat processing files within ignore folders (#8063) 2020-02-02 16:33:17 +00:00
Joel Challis 8e500c3670 Align cformat rules with current CI implementation (#7936)
* Align cformat rules with current CI implementation

* Optimise file walking
2020-01-21 18:21:14 -08:00
skullY 5421ba11de Add support for newer versions of clang-format, if installed 2019-11-12 18:39:42 -08:00
skullydazed d569f08771
Configuration system for CLI (#6708)
* Rework how bin/qmk handles subcommands

* qmk config wip

* Code to show all configs

* Fully working `qmk config` command

* Mark some CLI arguments so they don't pollute the config file

* Fleshed out config support, nicer subcommand support

* sync with installable cli

* pyformat

* Add a test for subcommand_modules

* Documentation for the `qmk config` command

* split config_token on space so qmk config is more predictable

* Rework how subcommands are imported

* Document `arg_only`

* Document deleting from CLI

* Document how multiple operations work

* Add cli config to the doc index

* Add tests for the cli commands

* Make running the tests more reliable

* Be more selective about building all default keymaps

* Update new-keymap to fit the new subcommand style

* Add documentation about writing CLI scripts

* Document new-keyboard

* Update docs/cli_configuration.md

Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>

* Update docs/cli_development.md

Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>

* Update docs/cli_development.md

Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>

* Update docs/cli_development.md

Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>

* Address yan's comments.

* Apply suggestions from code review

suggestions from @noahfrederick

Co-Authored-By: Noah Frederick <code@noahfrederick.com>

* Apply suggestions from code review

Co-Authored-By: Noah Frederick <code@noahfrederick.com>

* Remove pip3 from the test runner
2019-09-22 13:25:33 -07:00
skullY 2d688ad14e readability enhancements 2019-08-31 08:50:25 -07:00
skullY 1784d1bfac Add support for passing files at the command line 2019-08-31 08:50:25 -07:00
skullY 9547774962 CLI command to format C code 2019-08-31 08:50:25 -07:00