Skip to content

fmt: refactor, fix typos#18392

Merged
medvednikov merged 6 commits intovlang:masterfrom
ttytm:fmt/refactor
Jun 10, 2023
Merged

fmt: refactor, fix typos#18392
medvednikov merged 6 commits intovlang:masterfrom
ttytm:fmt/refactor

Conversation

@ttytm
Copy link
Copy Markdown
Member

@ttytm ttytm commented Jun 9, 2023

Pedantic refactor and typo fixes.

For typos:
There are some occurrences of splitted that were marked as typos in my case, but I left them out. It's less common than casted, but can be used in a similar manner discussed here: #18379 (comment).

Altogether, there are not too many changes, but they have been split where it seemed reasonable for easy per-commit tracking / cherry-picking.

🤖 Generated by Copilot at 138aec2

This pull request improves the code quality and readability of the vlib/v/fmt module by refactoring some logic, using match and if expressions, and fixing typos in comments and filenames. It affects the files ./vlib/v/fmt/fmt.v, ./vlib/v/fmt/struct.v, ./vlib/v/fmt/comments.v, and several test files in ./vlib/v/fmt/tests/.

🤖 Generated by Copilot at 138aec2

  • Fix typos in comments and strings (link, link, link, link, link, link, link, link, link)
  • Refactor if-else statements into match statements for readability and consistency in vlib/v/fmt/fmt.v and vlib/v/fmt/struct.v (link, link, link, link, link)
  • Add or remove mut keyword from variables as required by V syntax or as a minor optimization and style improvement in vlib/v/fmt/fmt.v (link, link, link)
  • Simplify logic for getting or updating variables by using if expression syntax in vlib/v/fmt/struct.v (link, link, link, link)
  • Rename type_sym variable to sym_name for clarity and consistency in vlib/v/fmt/struct.v (link)
  • Rename files with embedded comments tests to fix spelling error (link, link)

@medvednikov
Copy link
Copy Markdown
Member

LGTM.

@yuyi98 @felipensp what do you think?

@medvednikov medvednikov merged commit c0843af into vlang:master Jun 10, 2023
@ttytm ttytm deleted the fmt/refactor branch August 22, 2023 13:35
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.

3 participants