redhat-documentation / vale-at-red-hat

Vale config files, styles, and docs to help individuals and teams roll out Vale
https://redhat-documentation.github.io/vale-at-red-hat/
MIT License
39 stars 59 forks source link

warning Do not use end punctuation in headings. RedHat.HeadingPunctuation #478

Open rolfedh opened 1 year ago

rolfedh commented 1 year ago

Describe the bug

Vale generates warning Do not use end punctuation in headings. RedHat.HeadingPunctuation for headings that contain no apparent end punctuation.

Examples:

rdlugyhe@rdlugyhe quarkus (QDOCS-218-style-edits *=) $ vale asciidoc/security-basic-authentication-tutorial.adoc --minAlertLevel=warning

 asciidoc/security-basic-authentication-tutorial.adoc
 65:1    warning  Do not use end punctuation in   RedHat.HeadingPunctuation 
                  headings.                                                 
 212:83  warning  Use correct American English    RedHat.Spelling           
                  spelling. Did you really mean                             
                  'bcrypt'?                                                 
 214:1   warning  Do not use end punctuation in   RedHat.HeadingPunctuation 
                  headings.                                                 
 379:58  warning  Use correct American English    RedHat.Spelling           
                  spelling. Did you really mean                             
                  'dev'?                                                    
 391:1   warning  Do not use end punctuation in   RedHat.HeadingPunctuation 
                  headings.                                                 
 395:1   warning  Do not use end punctuation in   RedHat.HeadingPunctuation 
                  headings.                                                 
 415:36  warning  Do not use end punctuation in   RedHat.HeadingPunctuation 
                  headings.                                                 
 448:74  error    Use 'Basic HTTP authentication  RedHat.CaseSensitiveTerms 
                  (first instance)' or 'Basic                               
                  authentication' rather than                               
                  'basic authentication'.                                   

✖ 1 error, 7 warnings and 0 suggestions in 1 file.
rdlugyhe@rdlugyhe quarkus (QDOCS-218-style-edits *=) $ 

To Reproduce Steps to reproduce the behavior:

  1. Download the attached file and run vale on it.
  2. Vale reports an illegitimate alert: warning Do not use end punctuation in headings. RedHat.HeadingPunctuation

security-basic-authentication-tutorial.zip

Expected behavior

Expect no error.

Additional context

aireilly commented 1 year ago

The following directives are picked up by the HTML build and insert section numbering into the output. Vale runs on HTML, and reads the section-numbering as an error.

:sectnums:
:sectnumlevels: 3

image

aireilly commented 1 year ago

Note you can work-around this by Adding the following configuration to the vale.ini:

[asciidoctor]
!sectnums = ""

the vale.ini accepts AsciiDoctor variables. Very handy. We should doc this somewhere.

aireilly commented 1 year ago

accidentally closed, reopening.