11195 Lint old man pages for errors with mandoc

Review Request #1974 — Created June 6, 2019 and submitted

mno-hime
illumos-gate
master
11195
1973
1975
0f2a0aa...
general

11195 Lint old man pages for errors with mandoc

With updated mandoc 1.14.5 update (#11190) some old man pages have errors resulting in display problems unless fixed.

Better to lint them for errors in the build. So far only one old man page does does not pass this lint: https://illumos.org/rb/r/1973/.

Full illumos-gate rebuild passed.

Log is bigger by 8k lines (old man pages which were not previously checked) of this sort:

checking syseventadm.1m

For my 50 minutes build it may be 1-2 minutes longer due to the checking.

  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
citrus
  1. Ship It!
    1. Andy, the check is now reworked completely, if you could review this again. Thanks!

  2. 
      
rm
  1. 
      
  2. usr/src/man/Makefile.man (Diff revision 1)
     
     
     
     
     
    Rather than running mandoc lint on the same files should we break this ino two different commands. The first which is operating on those where the egrep passes and then those that the egrep fails, rather than checking all of the new pages twice? I assume in this case that -Wwarning includes those from -Werror, but perhaps that's incorrect?
    1. Your assumption about -Wwarning being a super-set of -Werror is correct.

      However, I wonder if really the linting command is run twice in some cases.

      I don't know much about makefiles, so I assumed mechanics of &&/|| is the same as in shell.

      In this example true and false simulate $(EGREP)'s match, or, respectively, non-match:

      all: old new
      
      old:
              echo Old manpage: lint with error; \
              true && \
              echo MANDOC -Tlint -Werror || \
              echo MANDOC -Tlint -Wwarning ;
              echo
      
      new:
              echo New manpage: lint with warning; \
              false && \
              echo MANDOC -Tlint -Werror || \
              echo MANDOC -Tlint -Wwarning ;
              echo
      

      I get following results:

      $ make -s
      Old manpage: lint with error
      MANDOC -Tlint -Werror
      
      New manpage: lint with warning
      MANDOC -Tlint -Wwarning
      

      If my mock-up is correct, no man page is linted twice. Am I right in this?

    2. I think you're right and that I was misreading this. But I think that if we're already misreading it, we should probably use more parenthesis to make what we want more explicit or use an if statement to make the grouping clearer rather than assuming we'll get the same order of operations right.

    3. Fair enough, re-worked this with if-else clauses. Hopefully it's more readable now.

    4. Forgot to mention that I also retested it via illumos rebuild.

  3. 
      
mno-hime
rm
  1. Thanks for doing that, I think it's a lot clearer as to what's going on now!

  2. 
      
mno-hime
Review request changed

Status: Closed (submitted)

Loading...