Skip to content

Commit ddbb178

Browse files
yakryderbbatsov
authored andcommitted
Standardize docstring spelling
The notion of a docstring currently occurs 22 times in the style guide. This fixes the 5 non-standard spellings of ‘doc string’
1 parent 4fe7e76 commit ddbb178

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1914,7 +1914,7 @@ If a form supports docstrings directly prefer them over using `:doc` metadata:
19141914

19151915
=== Docstring Summary [[docstring-summary]]
19161916

1917-
Let the first line in the doc string be a complete, capitalized
1917+
Let the first line in the docstring be a complete, capitalized
19181918
sentence which concisely describes the var in question. This makes it
19191919
easy for tooling (Clojure editors and IDEs) to display a short a summary of
19201920
the docstring at various places.
@@ -2012,20 +2012,20 @@ Indent multi-line docstrings by two spaces.
20122012
(ns my.ns
20132013
"It is actually possible to document a ns.
20142014
It's a nice place to describe the purpose of the namespace and maybe even
2015-
the overall conventions used. Note how _not_ indenting the doc string makes
2015+
the overall conventions used. Note how _not_ indenting the docstring makes
20162016
it easier for tooling to display it correctly.")
20172017
20182018
;; bad
20192019
(ns my.ns
20202020
"It is actually possible to document a ns.
20212021
It's a nice place to describe the purpose of the namespace and maybe even
2022-
the overall conventions used. Note how _not_ indenting the doc string makes
2022+
the overall conventions used. Note how _not_ indenting the docstring makes
20232023
it easier for tooling to display it correctly.")
20242024
----
20252025

20262026
=== Docstring Leading Trailing Whitespace [[docstring-leading-trailing-whitespace]]
20272027

2028-
Neither start nor end your doc strings with any whitespace.
2028+
Neither start nor end your docstrings with any whitespace.
20292029

20302030
[source,clojure]
20312031
----
@@ -2036,7 +2036,7 @@ Neither start nor end your doc strings with any whitespace.
20362036
20372037
;; bad
20382038
(def silly
2039-
" It's just silly to start a doc string with spaces.
2039+
" It's just silly to start a docstring with spaces.
20402040
Just as silly as it is to end it with a bunch of them. "
20412041
42)
20422042
----

0 commit comments

Comments
 (0)