chore: add deps/cli to separate linter

This commit is contained in:
Gabriel Horner
2025-10-29 15:50:47 -04:00
parent e3ce613a74
commit b59164fa24

View File

@@ -16,6 +16,7 @@
["logseq.db.sqlite." "logseq.db.frontend."
"logseq.outliner.property" "logseq.outliner.validate" "logseq.outliner.page" "logseq.outliner.cli" "logseq.outliner.db-pipeline"
"logseq.api.db-based"
"logseq.cli"
"electron.db"
"frontend.handler.db-based."
"frontend.inference-worker"
@@ -55,6 +56,8 @@
"deps/outliner/src/logseq/outliner/db_pipeline.cljs"
"deps/outliner/src/logseq/outliner/validate.cljs"
"deps/outliner/src/logseq/outliner/page.cljs"
;; TODO: change to deps/cli/src when :block/name no longer in other cli namespaces
"deps/cli/src/logseq/cli/commands"
"src/main/frontend/handler/db_based"
"src/main/frontend/components/class.cljs"
"src/main/frontend/components/property.cljs"
@@ -95,7 +98,9 @@
(defn- validate-db-ns-not-in-file
[]
(let [res (grep-many db-graph-ns file-graph-paths)]
(when-not (and (= 1 (:exit res)) (= "" (:out res)))
(when-not (or (and (= 1 (:exit res)) (= "" (:out res)))
;; TODO: Refactor logseq.cli.common.file to not have file-based code
(= (:out res) "src/main/frontend/worker/file.cljs: [logseq.cli.common.file :as common-file]\n"))
(println "The following db graph namespaces should not be in file graph files:")
(println (:out res))
(System/exit 1))))
@@ -117,8 +122,7 @@
;; Use file-entity-util and entity-util when in a single graph context
"ldb/whiteboard\\?" "ldb/journal\\?" "ldb/page\\?"]
res (grep-many multi-graph-fns (into file-graph-paths db-graph-paths))]
(when-not (or (and (= 1 (:exit res)) (= "" (:out res)))
(and (zero? (:exit res)) (string/starts-with? (:out res) "src/main/mobile/components/app.cljs:")))
(when-not (and (= 1 (:exit res)) (= "" (:out res)))
(println "The following files should not have fns meant to be used in multi-graph contexts:")
(println (:out res))
(System/exit 1))))