-
Notifications
You must be signed in to change notification settings - Fork 469
feat(linter): add new sg linter rule to disable access of os.environ #15299
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
base: main
Are you sure you want to change the base?
Conversation
|
|
Bootstrap import analysisComparison of import times between this PR and base. SummaryThe average import time from this PR is: 216 ± 3 ms. The average import time from base is: 222 ± 4 ms. The import time difference between this PR and base is: -6.4 ± 0.2 ms. Import time breakdownThe following import paths have shrunk:
|
brettlangdon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you might be able to use ast-grep for this as well
check .sg/ for some of our existing lint rules.
sg run --pattern 'os.environ'
can also do the same checks for importing environ/getenv from os, usage of getenv, etc etc
Description
This PR is the base PR for the incoming PR migrating all the
os.environ(and equivalent) to a controlled and filtered env reader allowing only allow-listed configuration keys to be used in dd-trace-py for the larger initiative of Configuration Registry.Testing
Risks
None
Additional Notes
This will be part of a PR stack.