Skip to content

Initial impl of defaultIde selection setting #522

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

Merged
merged 5 commits into from
Jan 17, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix typo.
  • Loading branch information
bcpeinhardt committed Jan 17, 2025
commit 2214c99fe2c22940de14a86fbcd55e0b22ab2400
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,11 @@
)

// Check the provided setting to see if there's a default IDE to set.
val defaultIde = ides.find { it ->

Check notice on line 272 in src/main/kotlin/com/coder/gateway/views/steps/CoderWorkspaceProjectIDEStepView.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Redundant lambda arrow

Redundant lambda arrow
Copy link
Member

Choose a reason for hiding this comment

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

Qodana will complain about it -> since that is the default, although idk how much we should care about Qodana. Possibly ktlint would change this automatically.

Tangent, but I think there is an alias for find called firstOrNull. Kinda surprised there is no indexOfFirstOrNull, only indexOfFirst. indexOfFirst().takeIf { it >= 0 } would work around that I guess.

Anyway, no need to change to those, more that I nerd sniped myself. 😆

// Using contains on the displayable version of the ide means they can be as specific or as vague as they want
// CL 2023.3.6 233.15619.8 -> a specific Clion build
// CL 2023.3.6 -> a specific Clion version
// 2023.3.6 -> a specific version (some customers will on have one specific IDE in their list anyway)
// 2023.3.6 -> a specific version (some customers will only have one specific IDE in their list anyway)
if (settings.defaultIde.isEmpty()) {
false
} else {
Expand Down
Loading