Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Restructure environmentVariablesUsed detection to avoid falsely alerting #1196

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

Open
blast-hardcheese wants to merge 1 commit into bash-lsp:main
base: main
Choose a base branch
Loading
from blast-hardcheese:dstewart/bug/incorrectly-warning-on-shfmt-envvar-usage

Conversation

Copy link

@blast-hardcheese blast-hardcheese commented Sep 21, 2024

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

@blast-hardcheese blast-hardcheese Sep 23, 2024

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
Reviewers

@skovhus skovhus skovhus left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /