Skip to content

Commit f721a6e

Browse files
committed
Adhere to one sentence per line for adocs
1 parent 5db3cda commit f721a6e

8 files changed

+141
-111
lines changed

CHANGELOG.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ If you wish, you can read nitty gritty details on link:doc/design/01-merging-rew
2020
What follows is a summary of changes.
2121

2222
==== New
23-
* A new home under clj-commons. Thanks to @xsc, rewrite-clj will also retain its same maven coordinates on Clojars making for a seamless upgrade path for rewrite-clj v0 users.
23+
* A new home under clj-commons.
24+
Thanks to @xsc, rewrite-clj will also retain its same maven coordinates on Clojars making for a seamless upgrade path for rewrite-clj v0 users.
2425
* Now supports ClojureScript, merging in rewrite-cljs specific functionality.
2526
Frustrations like not having namespace map support and differences from rewrite-clj, like whitespace parsing, should now be things of the past.
2627
Rewrite-cljs users migrating to rewrite-clj v1 are now at, and will remain at, feature parity with rewrite-clj.
@@ -75,7 +76,8 @@ Rewrite-cljs users migrating to rewrite-clj v1 are now at, and will remain at, f
7576
* Moved from potemkin import-vars to static template based version https://github.com/clj-commons/rewrite-clj/issues/98[#98]:
7677
** Avoids frustration/mysteries of dynamic import-vars for users and maintainers
7778
** Argument names now correct in API docs (some were gensymed previously)
78-
** Also turfed use of custom version of potemkin defprotocol+ in favor of plain old defprotocol. Perhaps I missed something, but I did not see the benefit of defprotocol+ for rewrite-clj v1.
79+
** Also turfed use of custom version of potemkin defprotocol+ in favor of plain old defprotocol.
80+
Perhaps I missed something, but I did not see the benefit of defprotocol+ for rewrite-clj v1.
7981

8082
==== Internal changes (developer facing)
8183
* Tests updated to hit public APIs https://github.com/clj-commons/rewrite-clj/issues/106[#106]

README.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ Only a minor failure on zprint v1.1.1 was found due to intentional breaking chan
2525
* Please review link:CHANGELOG.adoc[change log] for an overview of all v1 changes.
2626
* I am very conservative on making any further v0->v1 breaking changes, but am open to breaking changes to any of the new v1 work.
2727

28-
We'll move out of alpha after folks have had a chance to give rewrite-clj v1 alpha a good shake. Things look solid but I would be very surprised if there are no issues and/or feedback.
28+
We'll move out of alpha after folks have had a chance to give rewrite-clj v1 alpha a good shake.
29+
Things look solid but I would be very surprised if there are no issues and/or feedback.
2930

3031
See https://github.com/clj-commons/rewrite-clj/projects/1[project page for current priorities].
3132

@@ -44,7 +45,8 @@ Rewrite-clj versioning scheme is: `major`.`minor`.`patch`-`test-qualifier`
4445
* `major` increments when a non alpha release API has been broken - something, as a rule, we'd like to avoid.
4546
* `minor` increments to convey significant new features have been added.
4647
* `patch` indicates bug fixes - it is the total number of commits in the repo.
47-
* `test-qualifier` is absent for stable releases. Can be `alpha`, `beta`, `rc1`, etc.
48+
* `test-qualifier` is absent for stable releases.
49+
Can be `alpha`, `beta`, `rc1`, etc.
4850

4951
== People
5052

doc/01-user-guide.adoc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Rewrite-clj is a library that can read, update and write Clojure, ClojureScript
1212
If rewrite-clj is not your cup of tea, consider following alternatives:
1313

1414
|===
15-
| Project | Parsing? | Writing? | Whitespace Perserving? | Includes Element Row/Col?
15+
| Project | Parsing? | Writing? | Whitespace Preserving? | Includes Element Row/Col?
1616

1717
| https://github.com/carocad/parcera[parcera]
1818
| yes
@@ -124,7 +124,7 @@ As you get more experienced with rewrite-clj, you will want to review link:#sexp
124124
=== Tools Deps
125125
Include the following dependency in your `deps.edn` file:
126126
//:test-doc-blocks/skip
127-
// NOTE: the version in this snippit is automaticaly updated by our release workflow
127+
// NOTE: the version in this snippit is automatically updated by our release workflow
128128
[source,clojure]
129129
----
130130
rewrite-clj/rewrite-clj {:mvn/version "0.6.1"}
@@ -288,7 +288,7 @@ Use:
288288
==== Familiar Functions for Updating Nodes with the Zip API
289289

290290
The zip API provides familiar ways to work with parsed Clojure data structures.
291-
It offers some functions that correspond to the standard Clojure seq functions, for example:
291+
It offers some functions that correspond to the standard Clojure `seq` functions, for example:
292292

293293
[source, clojure]
294294
----
@@ -324,7 +324,7 @@ It offers some functions that correspond to the standard Clojure seq functions,
324324
;; => "{:prefix/a 10 :prefix/b 20}"
325325
----
326326

327-
// Targetted from docstrings
327+
// Targeted from docstrings
328328
[#position-tracking]
329329
==== Tracking Position with the Zip API
330330

@@ -764,7 +764,8 @@ Observations:
764764
Rewrite-clj v1 will carry on.
765765
** It seems the idea might have been that the caller could eval the sexpr result if they wanted to?
766766
** Note for ClojureScript users, `read-string` is not available under `cljs.core`, but a version is available under `cljs.tools.reader`.
767-
2. Tag metadata is returned as boolean metadata. A user could infer the intent through inspection though.
767+
2. Tag metadata is returned as boolean metadata.
768+
A user could infer the intent through inspection though.
768769

769770
// NOTE: target of some docstrings
770771
[#namespaced-elements]
@@ -889,7 +890,7 @@ The resulting zipper will then automatically apply your `:auto-resolve` within a
889890
** `edit` - the current node is sexpr-ed
890891
** `get` and `assoc` - sexpr is applied to the map key
891892

892-
// NOTE: targetted from docstrings
893+
// NOTE: targeted from docstrings
893894
[#impact-of-auto-resolve]
894895
==== Impact of Auto-Resolve
895896

doc/02-developer-guide.adoc

Lines changed: 32 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@
55
== Supported Environments
66
Rewrite-clj is verified on each push on macOS, Ubuntu and Windows via GitHub Actions.
77

8-
All scripts are written in Clojure and most invoked via https://github.com/borkdude/babashka[babashka]. This gives us a cross platform
9-
scripting language that is familiar, fun and consistent. These docs will show babashka scripts invoked explicitly via babashka's `bb`; on
10-
macOS and linux feel free to leave out `bb`.
8+
All scripts are written in Clojure and most invoked via https://github.com/borkdude/babashka[babashka].
9+
This gives us a cross platform scripting language that is familiar, fun and consistent.
10+
These docs will show babashka scripts invoked explicitly via babashka's `bb`; on macOS and linux feel free to leave out `bb`.
1111

12-
We make use of planck for cljs bootstrap (aka cljs self-hosted) testing. Planck is currently not available for Windows.
12+
We make use of planck for cljs bootstrap (aka cljs self-hosted) testing.
13+
Planck is currently not available for Windows.
1314

14-
We test that rewrite-clj operates as expected when natively compile via GraalVM. Automated testing is setup using GraalVM v21 for
15-
both jdk8 and jdk11. On Windows we only test against jdk11 as tool setup for jdk8 on Windows seemed overly arduous.
15+
We test that rewrite-clj operates as expected when natively compile via GraalVM.
16+
Automated testing is setup using GraalVM v21 for both JDK8 and JDK11.
17+
On Windows we only test against JDK11 as tool setup for JDK8 on Windows seemed overly arduous.
1618

1719
== Prerequisites
1820
* Java JDK 1.8 or above
@@ -26,25 +28,23 @@ both jdk8 and jdk11. On Windows we only test against jdk11 as tool setup for jdk
2628

2729
==== Git and newlines
2830
The primary development OSes for rewrite-clj are macOS and Linux.
29-
Our line endings are lf only.
31+
Our line endings are LF only.
3032

3133
I'm not sure what Windows developers typically want for line endings while working on source.
32-
I expect, but don't know, that most Windows editors automatically handle lf as line ending.
34+
I expect, but don't know, that most Windows editors automatically handle LF as line ending.
3335
Someone let me know if I am wrong.
3436

3537
Note that I do explicitly set git's config `core.autocrlf` to `false` on our Windows CI unit test environment.
3638
Our import vars code generation checks currently rely on line endings remaining unconverted.
3739

3840
==== Babashka
39-
The Clojure story on Windows is still in the early chapters. https://scoop.sh/[Scoop] offers an easy way to install tools.
40-
@littleli is doing a great job w/maintaining https://github.com/littleli/scoop-clojure[scoop apps for Clojure, Babashka and other tools] and
41-
this is how I installed Babashka.
41+
The Clojure story on Windows is still in the early chapters.
42+
https://scoop.sh/[Scoop] offers an easy way to install tools.
43+
@littleli is doing a great job w/maintaining https://github.com/littleli/scoop-clojure[scoop apps for Clojure, Babashka and other tools] and this is how I installed Babashka.
4244

4345
==== Clojure
44-
We all choose our own paths, but for me, using https://github.com/borkdude/deps.clj[deps.clj] instead of
45-
https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows[Clojure's PowerShell Module] offered me no
46-
fuss no muss Clojure on Windows and GitHub Actions on Windows. I decided to install deps.clj not through scoop but through
47-
https://github.com/borkdude/deps.clj#windows[the deps.clj `install.ps1` script].
46+
We all choose our own paths, but for me, using https://github.com/borkdude/deps.clj[deps.clj] instead of https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows[Clojure's PowerShell Module] offered me no fuss no muss Clojure on Windows and GitHub Actions on Windows.
47+
I decided to install deps.clj not through scoop but through https://github.com/borkdude/deps.clj#windows[the deps.clj `install.ps1` script].
4848
This makes it simple to treat `deps.exe` as if it were the official `clojure` via a simple rename:
4949

5050
----
@@ -64,10 +64,10 @@ Here's what works on my Windows dev environment:
6464
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
6565
----
6666

67-
And finally, I never did figure out how to get the Windows prerequisites setup for the jdk8 version of GraalVM, so I only test on the jdk11 version.
67+
And finally, I never did figure out how to get the Windows prerequisites setup for the JDK8 version of GraalVM, so I only test on the JDK11 version.
6868

6969
== Setup
70-
After checking out this project from github,
70+
After checking out this project from GitHub,
7171

7272
1. Install JavaScript libraries and tools required by https://github.com/bensu/doo[doo] and https://github.com/thheller/shadow-cljs[shadow-cljs]:
7373
+
@@ -150,13 +150,14 @@ bb ./script/clj_watch.clj
150150
This launches https://github.com/lambdaisland/kaocha[kaocha] in watch mode.
151151

152152
=== ClojureScript
153-
For Clojurescript, I open a shell terminal window and run:
153+
For ClojureScript, I open a shell terminal window and run:
154154

155155
----
156156
bb ./script/cljs_watch.clj
157157
----
158158

159-
This launches https://figwheel.org/[fighweel main]. After initialization, your default web browser will automatically be opened with the figwheel auto-testing page.
159+
This launches https://figwheel.org/[fighweel main].
160+
After initialization, your default web browser will automatically be opened with the figwheel auto-testing page.
160161

161162
== Docs
162163

@@ -221,7 +222,8 @@ Current libs we test against:
221222

222223
Additional libs are welcome.
223224

224-
If you are troubleshooting locally, and want to only run specific tests, you can specify which ones you'd like to run. For example:
225+
If you are troubleshooting locally, and want to only run specific tests, you can specify which ones you'd like to run.
226+
For example:
225227

226228
----
227229
bb ./script/libs_tests.clj run cljfmt zprint
@@ -236,7 +238,6 @@ To check for outdated libs:
236238
bb ./script/libs_test.clj outdated
237239
----
238240

239-
240241
Notes:
241242

242243
* `libs_tests.clj` was developed on macOS and is run on CI under Linux only under JDK 11 only.
@@ -267,7 +268,8 @@ Note that checks are only done against installed `./node_modules`, so you may wa
267268
== Linting
268269
We use https://github.com/borkdude/clj-kondo[clj-kondo] for linting rewrite-clj source code.
269270

270-
We fail the build on any lint violations. The ci server runs:
271+
We fail the build on any lint violations.
272+
The CI server runs:
271273
----
272274
bb ./script/lint.clj
273275
----
@@ -288,14 +290,12 @@ bb ./script/gen_api_diffs.clj
288290
Run this script manually on an as-needed basis, and certainly before any official release.
289291
Generated reports are to be checked in to version control.
290292

291-
Reports are generated to `doc/generated/api-diffs/` and include manually written
292-
notes from `doc/diff-notes/`.
293+
Reports are generated to `doc/generated/api-diffs/` and include manually written notes from `doc/diff-notes/`.
293294

294-
These reports are referenced from other docs, so if you rename files, be sure to
295-
search for links.
295+
These reports are referenced from other docs, so if you rename files, be sure to search for links.
296296

297-
Makes use of https://github.com/lread/diff-apis[diff-apis]. Delete
298-
`.diff-apis/.cache` if you need a clean run.
297+
Makes use of https://github.com/lread/diff-apis[diff-apis].
298+
Delete `.diff-apis/.cache` if you need a clean run.
299299

300300

301301
== Cljdoc Preview
@@ -318,8 +318,7 @@ bb ./script/cljdoc_preview.clj start
318318

319319
The local cljdoc server allows your ingested docs to be viewed in your web browser.
320320

321-
The start command also automatically checks docker hub for any updates so that our cljdoc preview matches the
322-
current production version of cljdoc.
321+
The start command also automatically checks docker hub for any updates so that our cljdoc preview matches the current production version of cljdoc.
323322

324323
**Ingest Docs**
325324

@@ -328,9 +327,8 @@ To ingest rewrite-clj API and docs into the local cljdoc database:
328327
bb ./script/cljdoc_preview.clj ingest
329328
----
330329

331-
The ingest command automatically publishes rewrite-clj to your local maven repository
332-
(cljdoc only works with published jars), but you'll have to remember to git commit and git push
333-
your changes before ingesting.
330+
The ingest command automatically publishes rewrite-clj to your local maven repository (cljdoc only works with published jars).
331+
You'll have to remember to git commit and git push your changes before ingesting.
334332

335333
Repeat these steps any time you want to preview changes.
336334

@@ -350,8 +348,7 @@ When you are done, you'll want to stop your docker container:
350348
bb ./script/cljdoc_preview.clj stop
351349
----
352350

353-
This will also delete temporary files created to support your preview session, most notably the local
354-
cljdoc database.
351+
This will also delete temporary files created to support your preview session, most notably the local cljdoc database.
355352

356353
Note that NO cleanup is done for any rewrite-clj artifacts published to your local maven repository.
357354

doc/03-faq.adoc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33
== Documentation
44

55
=== What is the meaning of the ^:no-doc metadata?
6-
Our goal is to produce documentation for users of rewrite-clj. As such we only want to document public APIs.
6+
Our goal is to produce documentation for users of rewrite-clj.
7+
As such we only want to document public APIs.
78

8-
`^:no-doc` is a signal to https://cljdoc.org/[cljdoc] that source code should not be included in generated documentation. This metadata convention was introduced by https://github.com/weavejester/codox[codox].
9+
`^:no-doc` is a signal to https://cljdoc.org/[cljdoc] that source code should not be included in generated documentation.
10+
This metadata convention was introduced by https://github.com/weavejester/codox[codox].
911

1012
== What the markdown?
1113
Stand alone articles are written up in https://asciidoctor.org/docs/what-is-asciidoc/[AsciiDoc].
1214

1315
1. it is a richer markup language than GitHub markdown.
1416
2. is supported by cljdoc.
1517

16-
Our docstrings sometimes take advantage of https://commonmark.org/[CommonMark] which is supported by cljdoc for docstrings. GitHub uses CommonMark as part of of its markdown solution.
18+
Our docstrings sometimes take advantage of https://commonmark.org/[CommonMark] which is supported by cljdoc for docstrings.
19+
GitHub uses CommonMark as part of of its markdown solution.

0 commit comments

Comments
 (0)