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

add rule to catch flags depending on boolean flags #446

Closed
cristiand391 opened this issue Jul 24, 2024 · 1 comment · Fixed by #447
Closed

add rule to catch flags depending on boolean flags #446

cristiand391 opened this issue Jul 24, 2024 · 1 comment · Fixed by #447
Labels
feature New feature or request

Comments

@cristiand391
Copy link
Member

cristiand391 commented Jul 24, 2024

having a flag dependOn a boolean flag only checks that the flag was specified (or it has a default value), when you likely want it to check its value was true:

sf data query -q 'select name,id from account limit 1' --wait 10

this works even thought --wait is only used with --bulk

--bulk default: false
https://github.com/salesforcecli/plugin-data/blob/cdaf1d3c85be33f7b34f012199052f3823e9114c/src/commands/data/query.ts#L63
--wait dependOn --bulk
https://github.com/salesforcecli/plugin-data/blob/cdaf1d3c85be33f7b34f012199052f3823e9114c/src/commands/data/query.ts#L71

AC:

  • depending on a boolean flag causes an error (even if the bool flag has a default value)
  • autofix to make it use relationships to check that the boolean flag value is true (see screenshot below)

Screenshot 2024-07-19 at 11 06 45 AM

@cristiand391 cristiand391 changed the title having a flag dependOn a boolean flag only checks that the flag was specified (or it has a default value), when you likely want it to check its value was true: add rule to catch flags depending on boolean flags Jul 24, 2024
@cristiand391 cristiand391 added the feature New feature or request label Jul 24, 2024
Copy link

git2gus bot commented Jul 24, 2024

This issue has been linked to a new work item: W-16320656

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

Successfully merging a pull request may close this issue.

1 participant