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

Restructure environmentVariablesUsed detection to avoid falsely alerting #1196

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

blast-hardcheese
Copy link

Avoid incorrectly warning the user of shfmt envvar configuration:

03:53:00.510 WARNING ⛔️ Environment variable configuration is being deprecated, please use workspace configuration. The following environment variables were used: shfmt

Thank you!

const environmentVariablesUsed = Object.entries(rawConfig)
.map(([key, value]) => (typeof value !== 'undefined' ? key : null))
.filter((key): key is string => key !== null)
.filter((key) => key !== 'logLevel') // logLevel is a special case that we ignore
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we filter out shfmt here like we already filter out loglevel?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personal preference, if I'm honest. I trend towards exhaustivity checks, where possible, but I'm happy to switch it back to the way it was and add a test to the filter.

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

Successfully merging this pull request may close these issues.

2 participants