refactor: mv another common ns out of db dir

Allows for more improved separate linting
This commit is contained in:
Gabriel Horner
2025-04-28 11:22:17 -04:00
parent 88e99aefd4
commit 691b8866ef
16 changed files with 24 additions and 20 deletions

View File

@@ -61,7 +61,8 @@
(def file-graph-paths
"Paths _only_ for file graphs"
["deps/graph-parser/src/logseq/graph_parser/db.cljs"
["deps/db/src/logseq/db/file_based"
"deps/graph-parser/src/logseq/graph_parser/db.cljs"
"deps/graph-parser/src/logseq/graph_parser/extract.cljc"
"deps/graph-parser/src/logseq/graph_parser/property.cljs"
"deps/graph-parser/src/logseq/graph_parser.cljs"
@@ -119,12 +120,16 @@
"block/properties :"
;; anything org mode except for org.babashka or urls like schema.org
"[^\\.]org[^\\.]"
"file-based"
"#+BEGIN_"
"#+END_"
"pre-block"]))
;; For now use the whole code line. If this is too brittle can make this smaller
allowed-exceptions #{":block/pre-block? :block/scheduled :block/deadline :block/type :block/name :block/marker"
"(dissoc :block/format))]"
;; TODO: Mv these 2 file-based ns out of db files
"(:require [logseq.db.file-based.rules :as file-rules]))"
"[logseq.db.file-based.schema :as file-schema]))"
;; The next 3 are from components.property.value
"{:block/name page-title})"
"(when-not (db/get-page journal)"
@@ -158,7 +163,7 @@
(let [db-concepts
;; from logseq.db.frontend.schema
["closed-value" "class/properties" "classes" "property/parent"
"logseq.property" "logseq.class"]
"logseq.property" "logseq.class" "db-based"]
res (grep-many db-concepts file-graph-paths)]
(when-not (and (= 1 (:exit res)) (= "" (:out res)))
(println "The following files should not have contained db specific concepts:")