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

handle terminal switch() in return_linter() #2422

Merged
merged 11 commits into from
Dec 24, 2023
Merged

handle terminal switch() in return_linter() #2422

merged 11 commits into from
Dec 24, 2023

Conversation

MichaelChirico
Copy link
Collaborator

Closes #2343.

cc @MEO265

@codecov-commenter
Copy link

codecov-commenter commented Dec 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (acbfd77) 98.54% compared to head (9b6bfaa) 98.55%.

❗ Current head 9b6bfaa differs from pull request most recent head e2ecb04. Consider uploading reports for the commit e2ecb04 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2422   +/-   ##
=======================================
  Coverage   98.54%   98.55%           
=======================================
  Files         126      126           
  Lines        5721     5735   +14     
=======================================
+ Hits         5638     5652   +14     
  Misses         83       83           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MichaelChirico
Copy link
Collaborator Author

😆 Definitely my most unexpected time getting hit with the commented_code_linter() 🔨

switch(x, ...) | expr[1]: switch; expr[2]: x

Pretty impressive that parses as valid code!

@AshesITR
Copy link
Collaborator

😆 Definitely my most unexpected time getting hit with the commented_code_linter() 🔨

switch(x, ...) | expr[1]: switch; expr[2]: x

Pretty impressive that parses as valid code!

I like to prepend the code by #>, which generally kills parsing due to a missing LHS of > ;)

@MichaelChirico
Copy link
Collaborator Author

😆 Definitely my most unexpected time getting hit with the commented_code_linter() 🔨

switch(x, ...) | expr[1]: switch; expr[2]: x

Pretty impressive that parses as valid code!

I like to prepend the code by #>, which generally kills parsing due to a missing LHS of > ;)

right, but I would reserve that for code that's actually intended as code. In this case, I was writing a comment to explain the XPath

Copy link
Collaborator

@AshesITR AshesITR left a comment

Choose a reason for hiding this comment

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

Awesome!

AshesITR
AshesITR previously approved these changes Dec 23, 2023
@MichaelChirico
Copy link
Collaborator Author

roxygen test handy already 🤭

@AshesITR AshesITR merged commit e0a1d24 into main Dec 24, 2023
20 checks passed
@MichaelChirico MichaelChirico deleted the return-switch branch December 27, 2023 09:17
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.

return_linter() should allow switch() where every entry has an exit call
3 participants