You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CLOUDP-302068: Add a linter to forbid env var usage (#1690)
We want to avoid spreading the practice of accessing environment
variables deep in the call hierarchy. We only want to access env
vars in the `main` package or very close to it.
This commit adds a linter to help us with that.
It also adds `nolint:forbidigo` exceptions into places:
* Where we allow access (`main` package)
* Where we still unfortunately have access. These places ideally
need to change with time.
To find remaining undesired places, from repo root you can `grep`
all files for `nolint:forbidigo` excluding files with `main` package.
For example: `grep "nolint:forbidigo" --exclude main.go -r .`
0 commit comments