chore: add db and file graph linter to CI

This has run successfully locally for weeks. Also fix install doc for
bb tasks
This commit is contained in:
Gabriel Horner
2023-11-17 10:31:36 -05:00
parent a25ab8af30
commit 6f9143df4f
4 changed files with 11 additions and 4 deletions

View File

@@ -120,6 +120,9 @@ jobs:
- name: Lint invalid translation entries
run: bb lang:validate-translations
- name: Lint to keep db and file graph code separate
run: bb lint:db-and-file-graphs-separate
db-graph-test:
strategy:
matrix:

View File

@@ -336,7 +336,7 @@ docs](https://github.com/logseq/bb-tasks#logseqbb-tasksnbbwatch) for more info.
These tasks are specific to database graphs. For these tasks there is a one time setup:
```sh
$ cd deps/db && yarn install && cd -
$ cd deps/db && yarn install && cd ../outliner && yarn install && cd ../..
```
* `dev:validate-db` - Validates a DB graph's datascript schema

View File

@@ -12,11 +12,13 @@
- clj-kondo lint
- carve lint for unused vars
- lint for vars that are too large
- lint invalid translation entries"
- lint invalid translation entries
- lint to ensure file and db graph remain separate"
[]
(doseq [cmd ["clojure -M:clj-kondo --parallel --lint src --cache false"
"bb lint:carve"
"bb lint:large-vars"
"bb lint:db-and-file-graphs-separate"
"bb lang:validate-translations"
"bb lint:ns-docstrings"]]
(println cmd)

View File

@@ -78,8 +78,10 @@
;; from logseq.db.frontend.schema
[:block/properties-text-values :block/pre-block :recent/pages :file/handle :block/file :block/properties-order]
(map str)
;; e.g. block/properties :title
(into ["block/properties :"]))
(into [;; e.g. block/properties :title
"block/properties :"
;; anything org mode
"org"]))
res (apply shell {:out :string :continue true}
"git grep -E" (str "(" (string/join "|" file-concepts) ")")
db-graph-paths)]