Skip to content

Commit

Permalink
[lint] Fix empty or misplaced docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
Gilles Philippart committed Jun 1, 2022
1 parent 6b8f3a5 commit ffb5e28
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 25 deletions.
6 changes: 0 additions & 6 deletions src/jackdaw/data/admin.clj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
(ConfigEntry. k (:value v))))

(defn->data ConfigEntry->data
""
[^ConfigEntry e]
{:name (.name e)
:value (.value e)
Expand All @@ -27,13 +26,11 @@
;;; Config

(defn map->Config
""
^Config [m]
(Config.
(map (partial apply ->ConfigEntry) m)))

(defn->data Config->data
""
[^Config c]
(into {}
(comp (map ConfigEntry->data)
Expand All @@ -44,15 +41,13 @@
;;; TopicDescription

(defn->data TopicDescription->data
""
[^TopicDescription td]
{:is-internal? (.isInternal td)
:partition-info (map datafy (.partitions td))})

;;; NewTopic

(defn map->NewTopic
""
[{:keys [:topic-name
:partition-count
:replication-factor
Expand All @@ -71,7 +66,6 @@
;;;; Result types

(defn->data DescribeClusterResult->data
""
[^DescribeClusterResult dcr]
{:cluster-id (-> dcr .clusterId .get)
:controller (-> dcr .controller .get datafy)
Expand Down
2 changes: 0 additions & 2 deletions src/jackdaw/data/common.clj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
;;; Node

(defn->data Node->data
""
[^Node node]
{:host (.host node)
:port (.port node)
Expand All @@ -31,7 +30,6 @@
;;; TopicPartitionInfo

(defn->data TopicPartitionInfo->data
""
[^TopicPartitionInfo tpi]
{:isr (mapv datafy (.isr tpi))
:leader (datafy (.leader tpi))
Expand Down
8 changes: 0 additions & 8 deletions src/jackdaw/data/common_config.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@
;;; ConfigResource.Type

(def +broker-config-resource-type+
""
ConfigResource$Type/BROKER)

(def +topic-config-resource-type+
""
ConfigResource$Type/TOPIC)

(def +unknown-config-resource-type+
""
ConfigResource$Type/UNKNOWN)

(defn ->ConfigResourceType [o]
Expand All @@ -26,7 +23,6 @@
+unknown-config-resource-type+))

(defn->data ConfigResourceType->data
""
[^ConfigResource$Type crt]
(cond (= +broker-config-resource-type+ crt)
:config-resource/broker
Expand All @@ -40,22 +36,18 @@
;;; ConfigResource

(defn ->ConfigResource
""
[^ConfigResource$Type type ^String name]
(ConfigResource. type name))

(defn ->topic-resource
""
[name]
(->ConfigResource +topic-config-resource-type+ name))

(defn ->broker-resource
""
[name]
(->ConfigResource +broker-config-resource-type+ name))

(defn->data ConfigResource->data
""
[^ConfigResource cr]
{:name (.name cr)
:type (datafy (.type cr))})
1 change: 0 additions & 1 deletion src/jackdaw/streams/specs.clj
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
(ns jackdaw.streams.specs
""
{:license "BSD 3-Clause License <https://github.com/FundingCircle/jackdaw/blob/master/LICENSE>"}
(:require [clojure.spec.alpha :as s]
[jackdaw.specs]
Expand Down
1 change: 0 additions & 1 deletion src/jackdaw/test/commands.clj
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
(ns jackdaw.test.commands
""
(:require
[clojure.spec.alpha :as s]
[jackdaw.test.commands.base :as base]
Expand Down
1 change: 0 additions & 1 deletion src/jackdaw/test/fixtures.clj
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
(ns jackdaw.test.fixtures
""
(:require
[aleph.http :as http]
[clojure.java.io :as io]
Expand Down
12 changes: 7 additions & 5 deletions src/jackdaw/test/journal.clj
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
(ns jackdaw.test.journal
""
(:require
[clojure.set :refer [subset?]]
[clojure.tools.logging :as log]
Expand Down Expand Up @@ -56,9 +55,9 @@
(get m topic)))

(defn journal-result
[machine record]
"Journals the `record` in the appropriate place in the supplied test
machine's `:journal`"
[machine record]
(let [journal (:journal machine)]
(if-let [err (agent-error journal)]
(throw err)
Expand Down Expand Up @@ -122,27 +121,30 @@
[journal topic-name ks value]
(messages-by-kv-fn journal topic-name ks #(= value %)))

(defn by-key [topic-name ks value]
(defn by-key
"Returns the first message in the topic where attribute 'ks' is equal to 'value'. Can be
combined with the :watch command to assert that a message has been published:
[:watch (j/by-key :result-topic [:object :color] \"red\")]"
[topic-name ks value]
(fn [journal]
(first (messages-by-kv journal topic-name ks value))))

(defn by-keys [topic-name ks values]
(defn by-keys
"Returns all of the messages in the topic where attribute 'ks' is equal to one of the values.
Can be combined with the :watch command to assert that messages have been published:
[:watch (j/by-key :result-topic [:object :color] #{\"red\" \"green\" \"blue\"})]"
[topic-name ks values]
(fn [journal]
(messages-by-kv-fn journal topic-name ks (set values))))

(defn by-id [topic-name value]
(defn by-id
"Returns all of the messages in the topic with an id of `value`. Can be combined with the
:watch command to assert that a message with the supplied id has been published:
[:watch (j/by-id :result-topic 123)]"
[topic-name value]
(by-key topic-name [:id] value))

(defn all-keys-present
Expand Down
1 change: 0 additions & 1 deletion test/jackdaw/test/fixtures_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
(is (topic-exists? client topic-foo)))))

(defn test-resetter
""
{:style/indent 1}
[{:keys [app-config reset-params reset-fn]} assertion-fn]
(let [reset-args (atom [])
Expand Down

0 comments on commit ffb5e28

Please sign in to comment.