소스 검색

Document datalog linter introduced in #4503

Gabriel Horner 3 년 전
부모
커밋
320fbea9b9
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      docs/dev-practices.md

+ 7 - 0
docs/dev-practices.md

@@ -51,6 +51,13 @@ scripts/large_vars.clj
 
 To configure the linter, see its `config` var.
 
+### Datalog linting
+
+We use [datascript](https://github.com/tonsky/datascript)'s datalog to power our modeling and querying layer. Since datalog is concise, it is easy to write something invalid. To avoid typos and other preventable mistakes, we lint our queries and rules. Our queries are linted through clj-kondo and [datalog-parser](https://github.com/lambdaforge/datalog-parser). clj-kondo will error if it detects an invalid query. Our rules are linted through a script that also uses the datalog-parser. To run this linter:
+```
+scripts/lint_rules.clj
+```
+
 ## Testing
 
 We have unit and end to end tests.