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

Upgrade code reference warnings to errors. #420

Open
cchudant opened this issue Feb 10, 2023 · 1 comment
Open

Upgrade code reference warnings to errors. #420

cchudant opened this issue Feb 10, 2023 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest https://hacktoberfest.digitalocean.com help wanted Extra attention is needed

Comments

@cchudant
Copy link

Expected Behavior

I don't know if it's "expected" behavior per say, of feature/change request.

I'd like a way to have ReferenceWarning: Code reference mymodule.erroneous_reference in module "mymodule" does not match any documented object. be an error, so that my CI action catches this sort of problem.

Currently, it seems only import errors are considered "errors", as per --skip-error. I would expect that erroneous references should be errors as well, that can be downgraded to warning using --skip-error.

I can do a quick PR if that's ok with you :)

Actual Behavior

def test() -> "mymodule.erroneous_reference":
  pass

or

def test():
    """Hello world

    Returns:
        mymodule.erroneous_reference
    """
    pass

gives ReferenceWarning: Code reference mymodule.erroneous_reference in module "mymodule" does not match any documented object.

which is a warning, regardless if skip-errors is set.

Steps to Reproduce

def test() -> "mymodule.erroneous_reference":
  pass

Additional info

  • pdoc version: latest, master
@kernc kernc added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers Hacktoberfest https://hacktoberfest.digitalocean.com labels Jul 5, 2024
@ERosendo
Copy link
Contributor

ERosendo commented Jul 7, 2024

@kernc is Anyone working on a fix for this yet? I'd be happy to take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest https://hacktoberfest.digitalocean.com help wanted Extra attention is needed
Development

No branches or pull requests

3 participants