This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-12
Channels
- # announcements (65)
- # aws (1)
- # babashka (12)
- # beginners (111)
- # bristol-clojurians (1)
- # cider (32)
- # clj-kondo (55)
- # clojars (3)
- # clojure (71)
- # clojure-europe (17)
- # clojure-france (4)
- # clojure-italy (36)
- # clojure-losangeles (8)
- # clojure-nl (6)
- # clojure-uk (115)
- # clojurescript (2)
- # datomic (99)
- # fulcro (32)
- # graalvm (12)
- # graphql (20)
- # hoplon (203)
- # meander (56)
- # mount (3)
- # off-topic (17)
- # pathom (17)
- # reitit (22)
- # shadow-cljs (32)
- # spacemacs (9)
- # tools-deps (19)
- # vim (25)
- # vscode (3)
@borkdude The :missing-docstring
linter warns on deftype declarations like (deftype Foo [x])
. Is it intended behavior?
Same for deftest
I see.
(ns foo
{:clj-kondo/config {:linters {:missing-docstring {:level :warning}}}}
(:require [clojure.test :as t]))
(deftype Foo [x])
(t/deftest foo)
in carve we ignore vars that are created by deftype / deftest, etc like this: https://github.com/borkdude/carve/blob/0e2a6014e684b2f2cea9e95e44d7bab215ba904f/src/carve/impl.clj#L108-L118
yeah, I think we just are going to ignore deftest and deftype for missing docstrings
I use criterium-core in comment criterium dependency is in profiles.clj I don't want import it in the file
I don't have enough experience to say what is better Probably library and application developers have different expectations for default settings
Maybe it would be useful to have an option like {:profile :lib}, and defaults change accordingly
@borkdude about namespace docstrings? https://clojurians.slack.com/archives/CHY97NXE2/p1584026520189500
as another topic I mean https://clojurians.slack.com/archives/CHY97NXE2/p1584026536189900
if people need different settings for a lib, they can just change their config accordingly
people don't care but idea is to provide a guide for best practices for corresponding context
for example "missing docstring" is disabled by default. but it is no-go for libraries 🙂
again about rum
macros.
(defcs name doc-string? (< mixins+)? [ state-arg params* ] render-body+)
when I define component like
(rum/defcs hello-world
"Example react component."
[state name]
"foo")
then :missing-docstring
linter still complains about missing docstring.
@borkdude should I file an issue?:lint-as {app.database.hugsql/declare-fn clojure.core/declare
mount.core/defstate clojure.core/def
mount.tools.macrovich/deftime clojure.core/do
rum.core/defc clj-kondo.lint-as/def-catch-all
rum.core/defcs clj-kondo.lint-as/def-catch-all
rum.core/defcc clj-kondo.lint-as/def-catch-all}