Skip to content

Commit b59164f

Browse files
chore: add deps/cli to separate linter
1 parent e3ce613 commit b59164f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

scripts/src/logseq/tasks/dev/db_and_file_graphs.clj

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
["logseq.db.sqlite." "logseq.db.frontend."
1717
"logseq.outliner.property" "logseq.outliner.validate" "logseq.outliner.page" "logseq.outliner.cli" "logseq.outliner.db-pipeline"
1818
"logseq.api.db-based"
19+
"logseq.cli"
1920
"electron.db"
2021
"frontend.handler.db-based."
2122
"frontend.inference-worker"
@@ -55,6 +56,8 @@
5556
"deps/outliner/src/logseq/outliner/db_pipeline.cljs"
5657
"deps/outliner/src/logseq/outliner/validate.cljs"
5758
"deps/outliner/src/logseq/outliner/page.cljs"
59+
;; TODO: change to deps/cli/src when :block/name no longer in other cli namespaces
60+
"deps/cli/src/logseq/cli/commands"
5861
"src/main/frontend/handler/db_based"
5962
"src/main/frontend/components/class.cljs"
6063
"src/main/frontend/components/property.cljs"
@@ -95,7 +98,9 @@
9598
(defn- validate-db-ns-not-in-file
9699
[]
97100
(let [res (grep-many db-graph-ns file-graph-paths)]
98-
(when-not (and (= 1 (:exit res)) (= "" (:out res)))
101+
(when-not (or (and (= 1 (:exit res)) (= "" (:out res)))
102+
;; TODO: Refactor logseq.cli.common.file to not have file-based code
103+
(= (:out res) "src/main/frontend/worker/file.cljs: [logseq.cli.common.file :as common-file]\n"))
99104
(println "The following db graph namespaces should not be in file graph files:")
100105
(println (:out res))
101106
(System/exit 1))))
@@ -117,8 +122,7 @@
117122
;; Use file-entity-util and entity-util when in a single graph context
118123
"ldb/whiteboard\\?" "ldb/journal\\?" "ldb/page\\?"]
119124
res (grep-many multi-graph-fns (into file-graph-paths db-graph-paths))]
120-
(when-not (or (and (= 1 (:exit res)) (= "" (:out res)))
121-
(and (zero? (:exit res)) (string/starts-with? (:out res) "src/main/mobile/components/app.cljs:")))
125+
(when-not (and (= 1 (:exit res)) (= "" (:out res)))
122126
(println "The following files should not have fns meant to be used in multi-graph contexts:")
123127
(println (:out res))
124128
(System/exit 1))))

0 commit comments

Comments
 (0)