Skip to content

Commit 6fb156d

Browse files
committed
lib: at_parser: move generated code and ignore formatting
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 <[email protected]>
1 parent f7b59d2 commit 6fb156d

File tree

4 files changed

+269
-340
lines changed

4 files changed

+269
-340
lines changed

.checkpatch.conf

+1
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,5 @@
4949
--exclude doc/nrf/.*/.*/.*/images
5050
--exclude doc/nrf/.*/.*/.*/.*/images
5151
--exclude applications/nrf5340_audio/src/utils/macros
52+
--exclude lib/at_parser/generated
5253
--exclude lib/bin/lwm2m_carrier/include

lib/at_parser/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
zephyr_library()
88
zephyr_library_sources(
99
at_parser.c
10-
at_match.c
10+
generated/at_match.c
1111
)
1212

1313
zephyr_include_directories(include)

lib/at_parser/at_match.re

+4-9
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,14 @@
44
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
*/
66

7-
/* at_match.c generated by re2c 3.0
7+
/* at_match.c generated by re2c 3.0-1
88
*
99
* Generated with:
10-
* re2c at_match.re -o at_match.c -W --no-debug-info --tags
11-
*
12-
* Reformatted with:
13-
* clang-format-15 -i at_match.c
14-
* Using the following additional .clangformat options:
15-
* IndentGotoLabels: false
16-
* SpaceBeforeInheritanceColon: False
10+
* re2c at_match.re -o generated/at_match.c -W --tags --no-debug-info --no-generation-date \
11+
* --no-version
1712
*/
1813

19-
#include "at_match.h"
14+
#include "../at_match.h"
2015

2116
struct at_token at_match_cmd(const char *at, const char **remainder)
2217
{

0 commit comments

Comments
 (0)