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

Logical operator casing #32

Open
elsassph opened this issue May 25, 2021 · 2 comments
Open

Logical operator casing #32

elsassph opened this issue May 25, 2021 · 2 comments
Labels
good first issue Good for newcomers

Comments

@elsassph
Copy link
Collaborator

I've seen devs wanting to enforce either lowercase or uppercase for logical operators.

cond = a OR b AND NOT c
' vs
cond = a or b and not c
@elsassph elsassph added the good first issue Good for newcomers label Sep 27, 2021
@addison-adler
Copy link

@elsassph Been a few years but this works now!

  • "brightscript.format.keywordCase": "<lower|title|upper|original>" applies to all keywords.

  • "brightscript.format.keywordCaseOverride" can be used to apply specific overrides.
    Here is an example:

"brightscript.format.keywordCaseOverride": {
    "and": "upper",
    "or": "upper",
    "not": "upper"
}

@TwitchBronBron This one could be marked complete? I'm not sure which release this got added in (since it was opened in 2021) but it does work in present-day 🙂

@TwitchBronBron
Copy link
Member

Those formatter settings will definitely change the keywords to the correct case, but I believe the point of this ticket is actually to show a diagnostic when they're wrong. (for running in CI/CD environments where a developer may not have run the formatter before committing).

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

No branches or pull requests

3 participants