Skip to content

Commit

Permalink
lib: at_parser: move generated code and ignore formatting
Browse files Browse the repository at this point in the history
Moves the generated `at_match.c` to the `generated` directory
and adds this directory to the excluded list for Checkpatch,
so that the generated file does not require reformatting.
This makes versioning easier since it removes the reformatting
step necessary to comply with Checkpatch.

Signed-off-by: Mirko Covizzi <mirko.covizzi@nordicsemi.no>
  • Loading branch information
MirkoCovizzi committed Aug 26, 2024
1 parent f7b59d2 commit 6fb156d
Show file tree
Hide file tree
Showing 4 changed files with 269 additions and 340 deletions.
1 change: 1 addition & 0 deletions .checkpatch.conf
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@
--exclude doc/nrf/.*/.*/.*/images
--exclude doc/nrf/.*/.*/.*/.*/images
--exclude applications/nrf5340_audio/src/utils/macros
--exclude lib/at_parser/generated
--exclude lib/bin/lwm2m_carrier/include
2 changes: 1 addition & 1 deletion lib/at_parser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
zephyr_library()
zephyr_library_sources(
at_parser.c
at_match.c
generated/at_match.c
)

zephyr_include_directories(include)
13 changes: 4 additions & 9 deletions lib/at_parser/at_match.re
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,14 @@
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/* at_match.c generated by re2c 3.0
/* at_match.c generated by re2c 3.0-1
*
* Generated with:
* re2c at_match.re -o at_match.c -W --no-debug-info --tags
*
* Reformatted with:
* clang-format-15 -i at_match.c
* Using the following additional .clangformat options:
* IndentGotoLabels: false
* SpaceBeforeInheritanceColon: False
* re2c at_match.re -o generated/at_match.c -W --tags --no-debug-info --no-generation-date \
* --no-version
*/

#include "at_match.h"
#include "../at_match.h"

struct at_token at_match_cmd(const char *at, const char **remainder)
{
Expand Down
Loading

0 comments on commit 6fb156d

Please sign in to comment.