Skip to content
Open
Changes from all commits
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
55 changes: 46 additions & 9 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,54 @@ end_of_line=lf
insert_final_newline=true
indent_style=space
indent_size=2

[*.json]
indent_style=space
indent_size=2
Comment on lines -12 to -13
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: Those directives are removed because they duplicate the one in [*]. Empty sections are removed as well.

image

ij_continuation_indent_size=4

[*.java]
indent_style=space
indent_size=2
continuation_indent_size=4
ij_java_class_count_to_use_import_on_demand = 99
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: Using 99 everywhere as some directives in other languages don't go over 100

ij_java_insert_inner_class_imports = false
ij_java_imports_layout = |,$*,|,*,|
ij_java_layout_on_demand_import_from_same_package_first = true
ij_java_layout_static_imports_separately = true
ij_java_names_count_to_use_import_on_demand = 99
ij_java_packages_to_use_import_on_demand = java.awt.*,javax.swing.*


ij_java_block_comment_add_space = false
ij_java_block_comment_at_first_column = false
ij_java_line_comment_add_space = true
ij_java_line_comment_add_space_on_reformat = false
ij_java_line_comment_at_first_column = false
Comment on lines +22 to +26
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: Personal take on this, I think comments should be indented by default to the correct context, instead of being at the beginning of the line.

E.g. this

  @TaskAction
  instrument() {
    workQueue().submit(InstrumentAction.class, parameters -> {
-//      parameters.buildStartedTime.set(this.invocationDetails.buildStartedTime)
-//      parameters.pluginClassPath.from(this.pluginClassPath)
-//      parameters.plugins.set(this.plugins)
+     // parameters.buildStartedTime.set(this.invocationDetails.buildStartedTime)
+     // parameters.pluginClassPath.from(this.pluginClassPath)
+     // parameters.plugins.set(this.plugins)
      parameters.instrumentingClassPath.setFrom(this.instrumentingClassPath)
      parameters.sourceDirectory.set(this.sourceDirectory.asFile)
      parameters.targetDirectory.set(this.targetDirectory.asFile)
    })
  }

Copy link
Contributor

Choose a reason for hiding this comment

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

❔ question: ‏spotless enforces us to move the // near to the code while the editor puts it at the start of line by default.
Will the editor put it in the right place with this config?

Copy link
Contributor

@PerfectSlayer PerfectSlayer Sep 11, 2025

Choose a reason for hiding this comment

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

📝 notes: My preference is having the comment at the start of the line so it really stands out and I find it easier to read during code review... But that's not the project spotless configuration 😢



[*.groovy]
ij_groovy_class_count_to_use_import_on_demand = 99
ij_groovy_imports_layout = $*,|,*,|
ij_groovy_names_count_to_use_import_on_demand = 99
ij_groovy_packages_to_use_import_on_demand = java.awt.*,javax.swing.*

ij_groovy_block_comment_add_space = false
ij_groovy_block_comment_at_first_column = false
ij_groovy_line_comment_add_space = true
ij_groovy_line_comment_add_space_on_reformat = false
ij_groovy_line_comment_at_first_column = false

[{*.kt,*.kts}]
ij_kotlin_import_nested_classes = false
ij_kotlin_imports_layout = *,java.**,javax.**,kotlin.**,^

ij_kotlin_name_count_to_use_star_import = 99
ij_kotlin_name_count_to_use_star_import_for_members = 99
ij_kotlin_packages_to_use_import_on_demand = kotlinx.android.synthetic.**,io.ktor.**

ij_kotlin_block_comment_add_space = false
ij_kotlin_block_comment_at_first_column = false
ij_kotlin_line_comment_add_space = true
ij_kotlin_line_comment_add_space_on_reformat = false
ij_kotlin_line_comment_at_first_column = false


[{*.yml,*.yaml}]
indent_style=space
indent_size=2
ij_yaml_line_comment_add_space = true
ij_yaml_line_comment_add_space_on_reformat = false
ij_yaml_line_comment_at_first_column = false