Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

man: Silence mandoc warnings in ksh.1. #1406

Closed
wants to merge 1 commit into from
Closed

Conversation

orbea
Copy link
Contributor

@orbea orbea commented Sep 21, 2019

This silences most warnings in the ksh.1 man page as show by mandoc.

man -l -Tlint ./ksh.1

I compared the rendered output before and after with diff(1) and found no differences.

For a mandoc warnings reference please see this link.

https://mandoc.bsd.lv/man/mandoc.1.html

Here are the silenced warnings.

man: ksh.1:389:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:842:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:1237:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:1552:79: STYLE: whitespace at end of input line
man: ksh.1:1837:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:1963:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:2045:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:2049:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:2072:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:2367:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:2369:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:2371:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:3065:47: STYLE: whitespace at end of input line
man: ksh.1:3135:10: STYLE: whitespace at end of input line
man: ksh.1:4530:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:5960:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:6003:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:6021:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:6267:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:6272:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:6283:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:6800:58: STYLE: whitespace at end of input line
man: ksh.1:7059:9: STYLE: whitespace at end of input line
man: ksh.1:7459:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:8045:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:8047:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:8049:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:8051:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:8053:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:8055:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:8057:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:8281:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:8283:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:8285:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:8288:2: WARNING: line scope broken: BR breaks SM
man: ksh.1:3203:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:3216:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:3921:2: WARNING: skipping paragraph macro: PP after SS
man: ksh.1:4215:2: WARNING: skipping paragraph macro: PP after SS
man: ksh.1:4789:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4793:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4801:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4805:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4809:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4813:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4817:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4821:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4825:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4829:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4835:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4841:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4845:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4856:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4868:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4872:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4876:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4880:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4884:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4890:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4901:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4905:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4909:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4913:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4923:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4927:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4931:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4945:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4949:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4953:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4957:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4961:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4965:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4969:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4973:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4981:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:4990:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:5001:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:5005:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:5009:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:5017:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:5022:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:5042:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:5048:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:5076:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:5087:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:5096:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:5104:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:5109:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:5116:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:5120:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:5133:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:5143:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:5147:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:5162:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:5166:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:5221:2: WARNING: skipping paragraph macro: PP after SS
man: ksh.1:6797:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:6797:2: WARNING: skipping paragraph macro: PP empty
man: ksh.1:8441:2: WARNING: skipping paragraph macro: PP after SH

Here are the remaining warnings.

man: ./ksh.1:6233:35: WARNING: undefined escape, printing literally: \=
man: ./ksh.1:7230:4: WARNING: undefined escape, printing literally: \+
man: ./ksh.1:7430:121: WARNING: undefined escape, printing literally: \+
man: ./ksh.1:7776:4: WARNING: undefined escape, printing literally: \+
man: ./ksh.1:7791:4: WARNING: undefined escape, printing literally: \+
man: ./ksh.1:8197:9: WARNING: undefined string, using "": S
man: ./ksh.1:16:12: WARNING: missing date, using today's date: TH
man: ./ksh.1:3871:36: WARNING: tab in filled text
man: ./ksh.1:3871:37: WARNING: tab in filled text
man: ./ksh.1:3871:38: WARNING: tab in filled text
man: ./ksh.1:3871:39: WARNING: tab in filled text
man: ./ksh.1:4217:1: WARNING: tab in filled text

@krader1961
Copy link
Contributor

Thanks. I'll go ahead and merge but note that we've begun work on issue #507 to convert the docs from man format to reStructuredText + Sphinx. So changes to the man page that simply affect the presentation (or lint issues) will have a short lifespan. If you have any experience working with Sphinx we'd love some help converting the documentation.

@krader1961 krader1961 closed this Sep 21, 2019
@orbea orbea deleted the mandoc branch September 21, 2019 02:16
@orbea
Copy link
Contributor Author

orbea commented Sep 21, 2019

Thanks for pointing that out, I was not aware of this issue or the work being done. Unfortunately I don't have any experience with sphinx and have avoided it because it requires many python dependencies here. Personally I prefer the mdoc markup language because it is well documented, easy to write and is supported out of the box seemingly everywhere.

https://mandoc.bsd.lv/man/mdoc.7.html

JohnoKing added a commit to JohnoKing/ksh that referenced this pull request Jan 7, 2022
This commit makes various different improvements to the documentation:
- sh.1: Backported (with changes) mandoc warning fixes from ksh2020
  for the ksh93(1) man page: <att#1406>
- Removed unnecessary spaces at the end of lines to fix a few other
  mandoc warnings.
- Fixed a few typos in the documentation.
- ANNOUNCE: Document the addition of the ${.sh.pid} variable
  (re: 9de6521).
- libast/man/str*: Update the man pages for the libast str* functions
  to improve how accurately each function is described.
- ksh93/README: Update regression test/compatibility notes to include
  OpenBSD 7.0, FreeBSD 13.0 and WSL running Ubuntu 20.04.
- Change a few places to store the return value from strlen in a
  size_t variable rather than signed int.
- comp/setlocale.c: To avoid confusion of the global variable 'lang'
  and function local variable also named 'lang', the function local
  variable has been renamed to 'langidx'.
JohnoKing added a commit to JohnoKing/ksh that referenced this pull request Jan 7, 2022
This commit makes various different improvements to the documentation:
- sh.1: Backported (with changes) mandoc warning fixes from ksh2020
  for the ksh93(1) man page: <att#1406>
- Removed unnecessary spaces at the end of lines to fix a few other
  mandoc warnings.
- Fixed various typos and capitalization errors in the documentation.
- ANNOUNCE: Document the addition of the ${.sh.pid} variable
  (re: 9de6521).
- libast/man/str*: Update the man pages for the libast str* functions
  to improve how accurately each function is described.
- ksh93/README: Update regression test/compatibility notes to include
  OpenBSD 7.0, FreeBSD 13.0 and WSL running Ubuntu 20.04.
- Change a few places to store the return value from strlen in a
  size_t variable rather than signed int.
- comp/setlocale.c: To avoid confusion of the global variable 'lang'
  and function local variable also named 'lang', the function local
  variable has been renamed to 'langidx'.
JohnoKing added a commit to JohnoKing/ksh that referenced this pull request Jan 7, 2022
This commit makes various different improvements to the documentation:
- sh.1: Backported (with changes) mandoc warning fixes from ksh2020
  for the ksh93(1) man page: <att#1406>
- Removed unnecessary spaces at the end of lines to fix a few other
  mandoc warnings.
- Fixed various typos and capitalization errors in the documentation.
- ANNOUNCE: Document the addition of the ${.sh.pid} variable
  (re: 9de6521).
- libast/man/str*: Update the man pages for the libast str* functions
  to improve how accurately each function is described.
- ksh93/README: Update regression test/compatibility notes to include
  OpenBSD 7.0, FreeBSD 13.0 and WSL running Ubuntu 20.04.
- Change a few places to store the return value from strlen in a
  size_t variable rather than signed int.
- comp/setlocale.c: To avoid confusion of the global variable 'lang'
  and function local variable also named 'lang', the function local
  variable has been renamed to 'langidx'.
JohnoKing added a commit to JohnoKing/ksh that referenced this pull request Jan 7, 2022
This commit makes various different improvements to the documentation:
- sh.1: Backported (with changes) mandoc warning fixes from ksh2020
  for the ksh93(1) man page: <att#1406>
- Removed unnecessary spaces at the end of lines to fix a few other
  mandoc warnings.
- Fixed various typos and capitalization errors in the documentation.
- ANNOUNCE: Document the addition of the ${.sh.pid} variable
  (re: 9de6521).
- libast/man/str*: Update the man pages for the libast str* functions
  to improve how accurately each function is described.
- ksh93/README: Update regression test/compatibility notes to include
  OpenBSD 7.0, FreeBSD 13.0 and WSL running Ubuntu 20.04.
- Change a few places to store the return value from strlen in a
  size_t variable rather than signed int.
- comp/setlocale.c: To avoid confusion of two separate variables named
  lang, the function local variable has been renamed to langidx.
McDutchie pushed a commit to ksh93/ksh that referenced this pull request Jan 7, 2022
This commit makes various different improvements to the documentation:
- sh.1: Backported (with changes) mandoc warning fixes from ksh2020
  for the ksh93(1) man page: <att#1406>
- Removed unnecessary spaces at the end of lines to fix a few other
  mandoc warnings.
- Fixed various typos and capitalization errors in the documentation.
- ANNOUNCE: Document the addition of the ${.sh.pid} variable
  (re: 9de6521).
- libast/man/str*: Update the man pages for the libast str* functions
  to improve how accurately each function is described.
- ksh93/README: Update regression test/compatibility notes to include
  OpenBSD 7.0, FreeBSD 13.0 and WSL running Ubuntu 20.04.
- Change a few places to store the return value from strlen in a
  size_t variable rather than signed int.
- comp/setlocale.c: To avoid confusion of two separate variables named
  lang, the function local variable has been renamed to langidx.
McDutchie pushed a commit to ksh93/ksh that referenced this pull request Jan 7, 2022
This commit makes various different improvements to the documentation:
- sh.1: Backported (with changes) mandoc warning fixes from ksh2020
  for the ksh93(1) man page: <att#1406>
- Removed unnecessary spaces at the end of lines to fix a few other
  mandoc warnings.
- Fixed various typos and capitalization errors in the documentation.
- ANNOUNCE: Document the addition of the ${.sh.pid} variable
  (re: 9de6521).
- libast/man/str*: Update the man pages for the libast str* functions
  to improve how accurately each function is described.
- ksh93/README: Update regression test/compatibility notes to include
  OpenBSD 7.0, FreeBSD 13.0 and WSL running Ubuntu 20.04.
- Change a few places to store the return value from strlen in a
  size_t variable rather than signed int.
- comp/setlocale.c: To avoid confusion of two separate variables named
  lang, the function local variable has been renamed to langidx.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants