mirror of
https://github.com/logseq/logseq.git
synced 2026-04-25 06:35:02 +00:00
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:
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user