Format files #1179

Merged
6543 merged 20 commits from :format into main 2022-08-15 14:26:03 +00:00
Reopened #1177 use https://codeberg.org/qwerty287/woodpecker-intellij-formatter
qwerty287 added 12 commits 2022-08-01 07:25:54 +00:00
ci/woodpecker/push/locale Pipeline was successful Details
ci/woodpecker/pr/locale Pipeline was successful Details
ci/woodpecker/push/check Pipeline failed Details
ci/woodpecker/push/build Pipeline failed Details
ci/woodpecker/pr/check Pipeline failed Details
ci/woodpecker/pr/build Pipeline failed Details
057f5dab9e
format java files
ci/woodpecker/push/locale Pipeline was successful Details
ci/woodpecker/pr/locale Pipeline was successful Details
ci/woodpecker/push/check Pipeline failed Details
ci/woodpecker/pr/check Pipeline failed Details
ci/woodpecker/pr/build Pipeline failed Details
ci/woodpecker/push/build Pipeline was successful Details
6bb091ae9e
Merge branch 'main' into format
ci/woodpecker/push/locale Pipeline was successful Details
ci/woodpecker/pr/locale Pipeline was successful Details
ci/woodpecker/pr/check Pipeline failed Details
ci/woodpecker/push/check Pipeline failed Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
877743007c
format xml files
ci/woodpecker/push/locale Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/pr/locale Pipeline was successful Details
ci/woodpecker/pr/check Pipeline failed Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/push/check Pipeline failed Details
59ed310459
format svg and yml
ci/woodpecker/push/locale Pipeline was successful Details
ci/woodpecker/pr/locale Pipeline was successful Details
ci/woodpecker/pr/check Pipeline failed Details
ci/woodpecker/push/check Pipeline failed Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
459cddc0da
CI: only checheck java files for now
ci/woodpecker/pr/locale Pipeline was successful Details
ci/woodpecker/pr/check Pipeline failed Details
ci/woodpecker/pr/build Pipeline failed Details
d4b0709280
Merge branch 'main' into format
qwerty287 added the
🪒 Refactor
label 2022-08-01 07:26:16 +00:00
qwerty287 added this to the 4.5.0 milestone 2022-08-01 07:26:20 +00:00
qwerty287 self-assigned this 2022-08-01 07:26:25 +00:00
qwerty287 added 1 commit 2022-08-01 07:30:06 +00:00
ci/woodpecker/pr/locale Pipeline was successful Details
ci/woodpecker/pr/check Pipeline failed Details
ci/woodpecker/pr/build Pipeline failed Details
9ebef8c996
Merge branch 'main' into format
qwerty287 added 1 commit 2022-08-01 07:32:14 +00:00
ci/woodpecker/pr/locale Pipeline was successful Details
ci/woodpecker/pr/check Pipeline failed Details
ci/woodpecker/pr/build Pipeline failed Details
ccc52d288e
Fix format
qwerty287 added 1 commit 2022-08-01 07:39:20 +00:00
ci/woodpecker/pr/locale Pipeline was successful Details
ci/woodpecker/pr/check Pipeline failed Details
ci/woodpecker/pr/build Pipeline was successful Details
7abf0113f9
Fix

@mmarif @6543
Hmm that's really weird. I can't format RepoDetailActivity correctly, everything else is ready now. It looks like the IntelliJ formatter has a bug here. Can somebody of you try to reformat the file? Feel free to push it here for testing if it worked. Otherwise, I'll ask Jetbrains' support.

@mmarif @6543 Hmm that's really weird. I can't format `RepoDetailActivity` correctly, everything else is ready now. It looks like the IntelliJ formatter has a bug here. Can somebody of you try to reformat the file? Feel free to push it here for testing if it worked. Otherwise, I'll ask Jetbrains' support.

@qwerty287 can you show where the issue is in formatting?

@qwerty287 can you show where the issue is in formatting?

Not really. It is very weird because it moves one of the ActivityResultLaunchers to another place, removes some newlines (this results in } private ActivityResultLauncher ... which is not correct of course). If I run the formatter again, it changes it back again - and so on. You can check that locally by

  1. formatting the file
  2. commit changes
  3. format again
  4. now, there shouldn't be any change anymore that can be commited
Not really. It is very weird because it moves one of the ActivityResultLaunchers to another place, removes some newlines (this results in `} private ActivityResultLauncher ...` which is not correct of course). If I run the formatter again, it changes it back again - and so on. You can check that locally by 1. formatting the file 2. commit changes 3. format again 4. now, there shouldn't be any change anymore that can be commited
Collaborator

Not really. It is very weird because it moves one of the ActivityResultLaunchers to another place, removes some newlines (this results in } private ActivityResultLauncher ... which is not correct of course). If I run the formatter again, it changes it back again - and so on. You can check that locally by

  1. formatting the file
  2. commit changes
  3. format again
  4. now, there shouldn't be any change anymore that can be commited

we can ignore that specific file for now and it looks like a bug ...

... so report it upstream?

> Not really. It is very weird because it moves one of the ActivityResultLaunchers to another place, removes some newlines (this results in `} private ActivityResultLauncher ...` which is not correct of course). If I run the formatter again, it changes it back again - and so on. You can check that locally by > 1. formatting the file > 2. commit changes > 3. format again > 4. now, there shouldn't be any change anymore that can be commited we can ignore that specific file for now and it looks like a bug ... ... so report it upstream?

I'll do this later.

I'll do this later.
Reported it, https://youtrack.jetbrains.com/issue/IDEA-299065/Formatting-a-Java-file-has-weird-results-and-repeats-itself.
qwerty287 added 2 commits 2022-08-15 10:03:27 +00:00
ci/woodpecker/pr/locale Pipeline was successful Details
ci/woodpecker/pr/check Pipeline failed Details
ci/woodpecker/pr/build Pipeline failed Details
5866ce2f52
Add a step to find correct format
qwerty287 added 2 commits 2022-08-15 10:08:01 +00:00
ci/woodpecker/pr/locale Pipeline was successful Details
ci/woodpecker/pr/check Pipeline was successful Details
ci/woodpecker/pr/build Pipeline failed Details
287376b9b7
reformat + fix
qwerty287 added 1 commit 2022-08-15 10:14:29 +00:00
ci/woodpecker/pr/locale Pipeline was successful Details
ci/woodpecker/pr/check Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
ddf2df823b
Fix format and remove tmp step

Nice! I was able to fix the formatting by adding a temporary step which prints out the diff after formatting. After applying this diff, it's working now!

Nice! I was able to fix the formatting by adding [a temporary step](https://codeberg.org/gitnex/GitNex/commit/5866ce2f5212bfd38084440d2a768fe34e91b81b) which [prints out the diff after formatting](https://ci.codeberg.org/gitnex/GitNex/build/416/8). After [applying this diff](https://codeberg.org/gitnex/GitNex/commit/ddf2df823b2b7344d05ffe977797f7a8d80e932f), [it's working now](https://ci.codeberg.org/gitnex/GitNex/build/417/8)!
6543 approved these changes 2022-08-15 14:25:35 +00:00
6543 referenced this issue from a commit 2022-08-15 14:26:03 +00:00
6543 merged commit a7d9918b67 into main 2022-08-15 14:26:03 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitnex/GitNex#1179
There is no content yet.