Skip to content

Refined code style: formatted all source files#2

Merged
IvashDima merged 1 commit into
Prog-Academy-projects:mainfrom
jscrdev:format-sources
Jul 15, 2025
Merged

Refined code style: formatted all source files#2
IvashDima merged 1 commit into
Prog-Academy-projects:mainfrom
jscrdev:format-sources

Conversation

@javadev

@javadev javadev commented Jul 5, 2025

Copy link
Copy Markdown
Contributor

Hi @IvashDima,

I’ve just submitted a new pull request where I focused on refining the code style throughout the project. For this update, I went through and formatted all of the source files to ensure consistency and readability. The changes cover indentation, spacing, and general formatting to make future development and code reviews smoother.

There shouldn’t be any functional changes - this is strictly about improving style and alignment with our coding standards.

When you have a moment, could you please review the changes? Let me know if you spot any issues or if you’d prefer any further adjustments.

Thanks a lot!

@javadev

javadev commented Jul 13, 2025

Copy link
Copy Markdown
Contributor Author

Please let me know if you have any feedback on this pull request

@IvashDima IvashDima merged commit 9d51ff1 into Prog-Academy-projects:main Jul 15, 2025
@IvashDima

Copy link
Copy Markdown
Collaborator

Hi @javadev,
Thanks a lot for the time and effort you’ve put into this! 🙏
I went through all the changes — the code definitely looks cleaner and more consistent now. Great job!

I had a couple of quick questions for clarification:

  1. What is the purpose of the .yml file you added? I haven’t worked much with YAML yet, so I’d appreciate a short explanation or resource.
    Probably, I will do smth with the .yml file? Because now in Checks tab I see:

Java CI Maven.yml on: push

Annotations
1 error
build
Process completed with exit code 1.
  1. I noticed different formatting for field annotations. For example:

java

@Autowired private final UserService userService;

In which cases should the annotation be placed on the same line, and when on a new one?

  1. Regarding line breaks — I assume long statements or multiple parameters/methods are best split into new lines, but it still seems a bit inconsistent. For instance:

java

@Query("SELECT u FROM CustomUser u WHERE u.email = :email")
Optional<CustomUser> findByEmail(@Param("email") String email);

vs

java

@Query(
    "SELECT CASE WHEN COUNT(u) > 0 THEN true ELSE false END FROM CustomUser u WHERE u.role = :role")
boolean existsByRole(@Param("role") UserRole role);

What’s the preferred rule of thumb here?

If you could provide some short guidelines or a good source where I can learn more about those questions, I’d be happy to check it out.

Thanks again — I really appreciate your help and guidance!

Best regards,
Dmytro

@javadev

javadev commented Jul 15, 2025

Copy link
Copy Markdown
Contributor Author

The .yml file I added is a GitHub Actions workflow script. Its purpose is to automate tasks—in this case, to execute Maven commands for the repository (such as building the project, running tests, etc.) whenever certain events occur, like a push or pull request.

I'm not sure why the build failed

@IvashDima

Copy link
Copy Markdown
Collaborator

The .yml file I added is a GitHub Actions workflow script. Its purpose is to automate tasks—in this case, to execute Maven commands for the repository (such as building the project, running tests, etc.) whenever certain events occur, like a push or pull request.

I'm not sure why the build failed

No worries, I'll try to improve it. The issue is probably in the tests.

@javadev

javadev commented Jul 16, 2025

Copy link
Copy Markdown
Contributor Author

Hi @IvashDima,

I have implemented fixes for the previously failing unit tests

#3

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