Skip to content

Verbose flag overrides --strict flag. #3991

Open

Description

@damar261

When I build my docs with mkdocs build --strict, I get an error because of warnings:

Aborted with 5 warnings in strict mode!

But with verbose on (mkdocs build -v --strict), the build finishes:

INFO    -  Documentation built in 10.17 seconds

The output value ($? in a bash terminal) has the same behavior: mkdocs build --strict returns 1 and mkdocs build -v --strict returns 0

Activity

  1. pawamoy commented on May 27, 2025

    @pawamoy
    Contributor

    Thanks for the report. Maintainers will need a reproduction example to confirm and fix the issue.

  2. damar261 commented on May 28, 2025

    @damar261
    Author

    Here is a minimalist example that reproduces the problem.

    Config file:

    site_name: name
    
    nav:
        - Home: index.md
    
    theme:
      name: readthedocs
    
    validation:
      nav:
        omitted_files: info
        not_found: warn
        absolute_links: warn
      links:
        not_found: warn
        anchors: warn
        absolute_links: warn
        unrecognized_links: warn
    

    Markdown content (index.md file):

    # Title
    
    ## Section
    
    Section
    
    ## Fonctionnalités
    
    [Misspelled link to previous section](./index.md#sectionn)
    
  3. pawamoy commented on May 28, 2025

    @pawamoy
    Contributor

    Confirmed! Thanks for the repro 🙂

  4. veerababu1729 commented on Jul 22, 2025

    @veerababu1729

    Is this bug resolved? May I know please.

  5. added a commit that references this issue on Apr 10, 2026
    c79c7d8
  6. vandit98 commented on May 5, 2026

    @vandit98

    Hi, Vandit here. I can reproduce this: verbose mode sets the MkDocs logger to DEBUG, and anchor-link collection is currently gated on the logger level instead of the configured validation level. I’m working on a focused regression test and fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions