]> git.proxmox.com Git - mirror_frr.git/commitdiff
style: add format checker config that matches FRR style standards
authorChristian Hopps <chopps@labn.net>
Tue, 18 Apr 2023 09:12:58 +0000 (05:12 -0400)
committerChristian Hopps <chopps@labn.net>
Tue, 18 Apr 2023 09:18:26 +0000 (05:18 -0400)
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 <chopps@labn.net>
.dir-locals.el [deleted file]
.flake8 [new file with mode: 0644]
.gitignore
.isort.cfg [new file with mode: 0644]
.pylintrc
tools/emacs.dir-locals.el [new file with mode: 0644]

diff --git a/.dir-locals.el b/.dir-locals.el
deleted file mode 100644 (file)
index b2d7cf3..0000000
+++ /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 (file)
index 0000000..e0ea542
--- /dev/null
+++ b/.flake8
@@ -0,0 +1,3 @@
+[flake8]
+max-line-length = 88
+extend-ignore = E203
\ No newline at end of file
index fb40ee52fed9e6aea49dbfc872caa614a7564406..3dd6a44409e3d948a729c3abafc5b07d23a56d58 100644 (file)
@@ -87,6 +87,7 @@
 {arch}
 build
 .cache
+.dir-locals.el
 .msg
 .rebase-*
 *~
diff --git a/.isort.cfg b/.isort.cfg
new file mode 100644 (file)
index 0000000..f238bf7
--- /dev/null
@@ -0,0 +1,2 @@
+[settings]
+profile = black
index 83a71974813137b456a3fd3a287461bfa0ab63e4..ba9430ba6b37a105169fdfa33df4eb0f5b70dc4f 100644 (file)
--- 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 (file)
index 0000000..b2d7cf3
--- /dev/null
@@ -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))))