From: Christian Hopps Date: Tue, 18 Apr 2023 09:12:58 +0000 (-0400) Subject: style: add format checker config that matches FRR style standards X-Git-Tag: base_9.0~158^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=960ab543cf3c6c2cffc587da8bbe3f25515c9abe;p=mirror%2Ffrr.git style: add format checker config that matches FRR style standards Also move .dir-locals.el to a sample file. This file should not be in the repository as it affects the user's ability to modify it. Signed-off-by: Christian Hopps --- diff --git a/.dir-locals.el b/.dir-locals.el deleted file mode 100644 index b2d7cf376d..0000000000 --- a/.dir-locals.el +++ /dev/null @@ -1,8 +0,0 @@ -;;; Directory Local Variables -;;; For more information see (info "(emacs) Directory Variables") -;;; Match project coding conventions - -((c-mode . ((indent-tabs-mode . t) - (show-trailing-whitespace . t) - (c-basic-offset . 8))) - (json-mode . ((js-indent-level 4)))) diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000000..e0ea542fd2 --- /dev/null +++ b/.flake8 @@ -0,0 +1,3 @@ +[flake8] +max-line-length = 88 +extend-ignore = E203 \ No newline at end of file diff --git a/.gitignore b/.gitignore index fb40ee52fe..3dd6a44409 100644 --- a/.gitignore +++ b/.gitignore @@ -87,6 +87,7 @@ {arch} build .cache +.dir-locals.el .msg .rebase-* *~ diff --git a/.isort.cfg b/.isort.cfg new file mode 100644 index 0000000000..f238bf7ea1 --- /dev/null +++ b/.isort.cfg @@ -0,0 +1,2 @@ +[settings] +profile = black diff --git a/.pylintrc b/.pylintrc index 83a7197481..ba9430ba6b 100644 --- a/.pylintrc +++ b/.pylintrc @@ -2,5 +2,8 @@ init-hook="import sys; sys.path.insert(0, '..')" signature-mutators=common_config.retry,retry +[FORMAT] +max-line-length = 88 + [MESSAGES CONTROL] disable=I,C,R,W diff --git a/tools/emacs.dir-locals.el b/tools/emacs.dir-locals.el new file mode 100644 index 0000000000..b2d7cf376d --- /dev/null +++ b/tools/emacs.dir-locals.el @@ -0,0 +1,8 @@ +;;; Directory Local Variables +;;; For more information see (info "(emacs) Directory Variables") +;;; Match project coding conventions + +((c-mode . ((indent-tabs-mode . t) + (show-trailing-whitespace . t) + (c-basic-offset . 8))) + (json-mode . ((js-indent-level 4))))