Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8311227

Add .editorconfig so IDEs would pick up the common settings automatically: indent, trim trailing whitespace

XMLWordPrintable

      I propose adding .editorconfig files so it would be easier for the contributors to configure basic editor settings.

      For instance, there's jcheck configuration for managing whitespace: https://github.com/openjdk/jdk/blob/52ee570025589d4d813ec4deae1f6133ca83156b/.jcheck/conf#L17-L19

      Unfortunately, contributors have to configure the same in their editors manually as jcheck configuration is not widespread.

      The same settings could be configured in `.editorconfig`:

      {noformat}
      [{*.cpp,*hpp}]
      trim_trailing_whitespace = true
      {noformat}

      Then many IDEs would be able to autoconfigure the settings, and trim the trailing whitespace on save.
      It would be nice if jcheck could pick settings from {{.editorconfig}}. Then the corresponding configuration could be stored in a single place only.

      See https://editorconfig.org/

            Unassigned Unassigned
            vsitnikov Vladimir Sitnikov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: