From 05c60d9a59cfe65b972d4600fb457757d382207a Mon Sep 17 00:00:00 2001 From: James Shubin Date: Thu, 22 Feb 2018 16:19:23 -0500 Subject: [PATCH] test, docs: Restrict long lines in markdown linter It's getting out of hand... --- README.md | 18 +++++++++++++----- docs/documentation.md | 11 ++++++----- docs/language-guide.md | 3 ++- docs/prometheus.md | 3 ++- misc/emacs/README.md | 6 ++++-- test/test-markdownlint.sh | 4 +++- 6 files changed, 30 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index c424b3b2..9bb421ab 100644 --- a/README.md +++ b/README.md @@ -49,18 +49,26 @@ Please read, enjoy and help improve our documentation! ## Questions: Please ask in the [community](#community)! -If you have a well phrased question that might benefit others, consider asking it by sending a patch to the [FAQ](docs/faq.md) section. I'll merge your question, and a patch with the answer! +If you have a well phrased question that might benefit others, consider asking +it by sending a patch to the [FAQ](docs/faq.md) section. I'll merge your +question, and a patch with the answer! ## Roadmap: -Feel free to grab one of the straightforward [#mgmtlove](https://github.com/purpleidea/mgmt/labels/mgmtlove) issues if you're a first time contributor to the project or if you're unsure about what to hack on! +Feel free to grab one of the straightforward [#mgmtlove](https://github.com/purpleidea/mgmt/labels/mgmtlove) +issues if you're a first time contributor to the project or if you're unsure +about what to hack on! Please see: [TODO.md](TODO.md) for a list of upcoming work and TODO items. -Please get involved by working on one of these items or by suggesting something else! +Please get involved by working on one of these items or by suggesting something +else! ## Bugs: -Please set the `DEBUG` constant in [main.go](https://github.com/purpleidea/mgmt/blob/master/main.go) to `true`, and post the logs when you report the [issue](https://github.com/purpleidea/mgmt/issues). -Bonus points if you provide a [shell](https://github.com/purpleidea/mgmt/tree/master/test/shell) or [OMV](https://github.com/purpleidea/mgmt/tree/master/test/omv) reproducible test case. +Please set the `DEBUG` constant in [main.go](https://github.com/purpleidea/mgmt/blob/master/main.go) +to `true`, and post the logs when you report the [issue](https://github.com/purpleidea/mgmt/issues). +Bonus points if you provide a [shell](https://github.com/purpleidea/mgmt/tree/master/test/shell) +or [OMV](https://github.com/purpleidea/mgmt/tree/master/test/omv) reproducible +test case. Feel free to read my article on [debugging golang programs](https://purpleidea.com/blog/2016/02/15/debugging-golang-programs/). ## Patches: diff --git a/docs/documentation.md b/docs/documentation.md index cc4355f5..d5ba6d7d 100644 --- a/docs/documentation.md +++ b/docs/documentation.md @@ -21,12 +21,13 @@ For more information, you may like to read some blog posts from the author: * [Send/Recv in mgmt](https://purpleidea.com/blog/2016/12/07/sendrecv-in-mgmt/) * [Metaparameters in mgmt](https://purpleidea.com/blog/2017/03/01/metaparameters-in-mgmt/) -There is also an [introductory video](https://www.youtube.com/watch?v=LkEtBVLfygE&html5=1) available. -Older videos and other material [is available](on-the-web.md). +There is also an [introductory video](https://www.youtube.com/watch?v=LkEtBVLfygE&html5=1) +available. Older videos and other material [is available](on-the-web.md). ## Setup -You'll probably want to read the [quick start guide](quick-start-guide.md) to get going. +You'll probably want to read the [quick start guide](quick-start-guide.md) to +get going. ## Features @@ -366,8 +367,8 @@ GOTAGS="noaugeas novirt" make build ## Examples -For example configurations, please consult the [examples/](https://github.com/purpleidea/mgmt/tree/master/examples) directory in the git -source repository. It is available from: +For example configurations, please consult the [examples/](https://github.com/purpleidea/mgmt/tree/master/examples) +directory in the git source repository. It is available from: [https://github.com/purpleidea/mgmt/tree/master/examples](https://github.com/purpleidea/mgmt/tree/master/examples) diff --git a/docs/language-guide.md b/docs/language-guide.md index f88e3706..3d43e6b5 100644 --- a/docs/language-guide.md +++ b/docs/language-guide.md @@ -53,7 +53,8 @@ can be impossible to infer the item's type. #### map An unordered set of unique keys of the same type and corresponding value pairs -of another type, eg: `{"boiling" => 100, "freezing" => 0, "room" => "25", "house" => 22, "canada" => -30,}`. +of another type, eg: +`{"boiling" => 100, "freezing" => 0, "room" => "25", "house" => 22, "canada" => -30,}`. That is to say, all of the keys must have the same type, and all of the values must have the same type. You can use any type for either, although it is probably advisable to avoid using very complex types as map keys. diff --git a/docs/prometheus.md b/docs/prometheus.md index e2c2fb06..6c64a647 100644 --- a/docs/prometheus.md +++ b/docs/prometheus.md @@ -31,7 +31,8 @@ Here is a list of the metrics we provide: - `mgmt_checkapply_total`: The number of CheckApply's that mgmt has run - `mgmt_failures_total`: The number of resources that have failed - `mgmt_failures`: The number of resources that have failed -- `mgmt_graph_start_time_seconds`: Start time of the current graph since unix epoch in seconds +- `mgmt_graph_start_time_seconds`: Start time of the current graph since unix +epoch in seconds For each metric, you will get some extra labels: diff --git a/misc/emacs/README.md b/misc/emacs/README.md index 38a9eebf..af4d37dc 100644 --- a/misc/emacs/README.md +++ b/misc/emacs/README.md @@ -3,10 +3,12 @@ # `mgmtconfig-mode` -[Mgmt](https://github.com/purpleidea/mgmt/) is a distributed, event-driven, parallel configuration management tool. +[Mgmt](https://github.com/purpleidea/mgmt/) is a distributed, event-driven, +parallel configuration management tool. `mgmtconfig-mode` is an Emacs major mode for editing the [mgmt language](https://purpleidea.com/blog/2018/02/05/mgmt-configuration-language/). ## Installation -See the MELPA Emacs Lisp package archive’s [getting started](https://melpa.org/#/getting-started) guide. Then, select “Options → Manage Emacs Packages” from the menu in Emacs. +See the MELPA Emacs Lisp package archive’s [getting started](https://melpa.org/#/getting-started) +guide. Then, select “Options → Manage Emacs Packages” from the menu in Emacs. diff --git a/test/test-markdownlint.sh b/test/test-markdownlint.sh index 2aa1e5b8..4048adb2 100755 --- a/test/test-markdownlint.sh +++ b/test/test-markdownlint.sh @@ -22,7 +22,6 @@ cat << 'EOF' > $STYLE all exclude_rule 'MD010' # Hard tabs exclude_rule 'MD032' # Lists should be surrounded by blank lines -exclude_rule 'MD013' # Line length exclude_rule 'MD040' # Fenced code blocks should have a language specified exclude_rule 'MD026' # Trailing punctuation in header exclude_rule 'MD024' # Multiple headers with the same content @@ -35,6 +34,9 @@ exclude_rule 'MD029' # Ordered list item prefix # FIXME: bug: https://github.com/markdownlint/markdownlint/issues/182 exclude_rule 'MD039' # Spaces inside link text + +# Line length +rule 'MD013', :line_length => 80, :code_blocks => false, :tables => false EOF #STYLE="test/mdl.style" # style file