aboutsummaryrefslogtreecommitdiff
path: root/.swiftlint.yml
diff options
context:
space:
mode:
authorRuben Beltran del Rio <jj@r.bdr.sh>2026-06-16 12:08:21 +0200
committerRuben Beltran del Rio <jj@r.bdr.sh>2026-06-16 12:22:47 +0200
commit501fdce29e4d2c46c4708ad7f44056878e0db3fa (patch)
treedb923b77037db9f5b37600a6e34c3bb2e8a971be /.swiftlint.yml
Initial extraction from Norganize1.0.0
Diffstat (limited to '.swiftlint.yml')
-rw-r--r--.swiftlint.yml36
1 files changed, 36 insertions, 0 deletions
diff --git a/.swiftlint.yml b/.swiftlint.yml
new file mode 100644
index 0000000..51b479a
--- /dev/null
+++ b/.swiftlint.yml
@@ -0,0 +1,36 @@
+# SwiftLint configuration for NorgKit.
+# Tuned to the existing style rather than forcing churn: the parsers use short,
+# conventional cursor names (i, j, lo, hi, c, s, m) and the recogniser functions
+# are intentionally long, flat state machines.
+
+included:
+ - Sources
+ - Tests
+ - Benchmarks
+
+identifier_name:
+ # Allow short loop/cursor names that read clearly in tight parsing loops.
+ min_length:
+ warning: 1
+ error: 1
+
+line_length:
+ warning: 120
+ error: 160
+ ignores_comments: true
+ ignores_urls: true
+
+function_body_length:
+ warning: 80
+ error: 120
+
+cyclomatic_complexity:
+ warning: 15
+ error: 25
+
+disabled_rules:
+ # "TODO" appears in doc comments describing Norg's TODO-status syntax.
+ - todo
+ # Trailing commas are used selectively (e.g. the modifier tables); leave the
+ # choice to the author rather than enforcing one way.
+ - trailing_comma