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

Always curly #928

Merged
merged 1 commit into from
Sep 24, 2023
Merged

Always curly #928

merged 1 commit into from
Sep 24, 2023

Conversation

burner
Copy link

@burner burner commented Sep 1, 2023

Adds a check to always require BlockStatements after if|for|foreach|while|do|catch|try|finally

src/dscanner/analysis/always_curly.d Outdated Show resolved Hide resolved
src/dscanner/analysis/always_curly.d Outdated Show resolved Hide resolved
src/dscanner/analysis/always_curly.d Outdated Show resolved Hide resolved
src/dscanner/analysis/always_curly.d Outdated Show resolved Hide resolved
src/dscanner/analysis/always_curly.d Outdated Show resolved Hide resolved
src/dscanner/analysis/always_curly.d Outdated Show resolved Hide resolved
src/dscanner/analysis/always_curly.d Outdated Show resolved Hide resolved
src/dscanner/analysis/always_curly.d Outdated Show resolved Hide resolved
src/dscanner/analysis/always_curly.d Outdated Show resolved Hide resolved
src/dscanner/analysis/always_curly.d Outdated Show resolved Hide resolved
@WebFreak001
Copy link
Member

can you also auto-format the code with dfmt (default settings or so)?

@burner burner changed the title Always curly WIP: Always curly Sep 3, 2023
@WebFreak001 WebFreak001 marked this pull request as draft September 4, 2023 14:31
@burner burner changed the title WIP: Always curly Always curly Sep 6, 2023
@burner
Copy link
Author

burner commented Sep 14, 2023

@WebFreak001 anything else you want me to do on this?

@WebFreak001 WebFreak001 marked this pull request as ready for review September 14, 2023 09:04
Check that if|else|for|foreach|while|do|try|catch
are always followed by a BlockStatement aka. { }

closer

can not get the test to work

try to get the AutoFix in place

maybe a fix

nicer messages

some formatting

more tinkering

still nothing

autofix work now

AutoFix name

message to message_postfix
@WebFreak001 WebFreak001 merged commit b43c8f4 into dlang-community:master Sep 24, 2023
19 checks passed
@burner
Copy link
Author

burner commented Oct 2, 2023

@WebFreak001 thank you

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