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

[Pylint] False positive for do-not-log-exceptions rule #9861

Open
pvaneck opened this issue Feb 19, 2025 · 1 comment
Open

[Pylint] False positive for do-not-log-exceptions rule #9861

pvaneck opened this issue Feb 19, 2025 · 1 comment
Assignees

Comments

@pvaneck
Copy link
Member

pvaneck commented Feb 19, 2025

The do-not-log-exceptions rule states that we should not log exceptions in levels other than debug. However, debug statements with exceptions passed in are still getting flagged.

For example, the following line from azure-identity:

except Exception as ex:  # pylint: disable=broad-except
    _LOGGER.debug("Failed to log the account information: %s", ex, exc_info=True)

is still getting the following error when running next-pylint:

azure/identity/_internal/decorators.py:48: [C4766(do-not-log-exceptions), log_get_token.wrapper] Do not log exceptions. See Details: https://azure.github.io/azure-sdk/python_implementation.html#python-logging-sensitive-info

Expectation: This should not show up as a pylint error.

cc @l0lawrence

@github-actions github-actions bot added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Feb 19, 2025
@github-actions github-actions bot removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Feb 19, 2025
@l0lawrence
Copy link
Member

oh I will take a look today thanks!

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

No branches or pull requests

2 participants