From 590b405468fec906a51767a5cda4aa30ada5d52f Mon Sep 17 00:00:00 2001 From: Bao Date: Wed, 15 Sep 2021 23:59:57 -0500 Subject: New CLI subcommand to create clang-compatible compilation database (`compile_commands.json`) (#14370) * pulled source from dev branch * missed a file from origin * formatting * revised argument names. relaxed matching rules to work for avr too * add docstrings * added docs. tightened up regex * remove unused imports * cleaning up command file. use existing qmk dir constant * rename parser library file * move lib functions into command file. there are only 2 and they aren't large * currently debugging... * more robustly find config * updated docs * remove unused imports * reuse make executable from the main make command * pulled source from dev branch * missed a file from origin * formatting * revised argument names. relaxed matching rules to work for avr too * add docstrings * added docs. tightened up regex * remove unused imports * cleaning up command file. use existing qmk dir constant * rename parser library file * move lib functions into command file. there are only 2 and they aren't large * currently debugging... * more robustly find config * updated docs * remove unused imports * reuse make executable from the main make command * remove MAKEFLAGS from environment for better control over process management * Update .gitignore Co-authored-by: Michael Forster * add a usage line to docs * doc change as suggested Co-authored-by: Nick Brassel * rename command * remove debug print statements * generate-compilation-database: fix arg handling * generate-comilation-db: improve error handling * use cli.run() instead of Popen() Co-authored-by: Xton Co-authored-by: Christon DeWan Co-authored-by: Michael Forster Co-authored-by: Nick Brassel --- lib/python/qmk/cli/__init__.py | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/python/qmk/cli/__init__.py') diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py index 292dcbe812..944938824c 100644 --- a/lib/python/qmk/cli/__init__.py +++ b/lib/python/qmk/cli/__init__.py @@ -44,6 +44,7 @@ subcommands = [ 'qmk.cli.format.python', 'qmk.cli.format.text', 'qmk.cli.generate.api', + 'qmk.cli.generate.compilation_database', 'qmk.cli.generate.config_h', 'qmk.cli.generate.dfu_header', 'qmk.cli.generate.docs', -- cgit v1.2.3