Commit graph

5 commits

Author SHA1 Message Date
David Lamparter 8916953b53 build: fix a few python string escape warnings
When using a regex (or anything that uses `\?` escapes) in python, raw
strings (`r"content"`) should be used so python doesn't consume the
escapes itself.  Otherwise we get either broken behavior and/or
`SyntaxWarning: invalid escape sequence '\['`

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-07-23 10:23:50 -07:00
David Lamparter acddc0ed3c *: auto-convert to SPDX License IDs
Done with a combination of regex'ing and banging my head against a wall.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-02-09 14:09:11 +01:00
David Lamparter 1f8031f79a *: make sure config.h or zebra.h is first
`config.h` has all the defines from autoconf, which may include things
that switch behavior of other included headers (e.g. _GNU_SOURCE
enabling prototypes for additional functions.)

So, the first include in any `.c` file must be either `config.h` (with
the appropriate guard) or `zebra.h` (which includes `config.h` first
thing.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-04-23 12:06:35 +02:00
whitespace 701a01920e *: reformat python files
We are now using black.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-10-07 17:22:26 -04:00
David Lamparter 980ab2de52 python: add check-first-header tool
The first #include statement in all FRR .c files should be either
zebra.h or config.h.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-04-27 09:52:41 +02:00