Commit fb8f84f
committed
Order imports when reformatting (#74059)
Change the formatter config to sort / order imports, and reformat the
codebase. We already had a config file for Eclipse users, so Spotless now
uses that.
The "Eclipse Code Formatter" plugin ought to be able to use this file as
well for import ordering, but in my experiments the results were poor.
Instead, use IntelliJ's `.editorconfig` support to configure import
ordering.
I've also added a config file for the formatter plugin.
Other changes:
* I've quietly enabled the `toggleOnOff` option for Spotless. It was
already possible to disable formatting for sections using the markers
for docs snippets, so enabling this option just accepts this reality
and makes it possible via `formatter:off` and `formatter:on` without
the restrictions around line length. It should still only be used as
a very last resort and with good reason.
* I've removed mention of the `paddedCell` option from the contributing
guide, since I haven't had to use that option for a very long time. I
moved the docs to the spotless config.1 parent ebaa0f0 commit fb8f84f
File tree
283 files changed
+660
-578
lines changed- .idea
- benchmarks/src/main/java/org/elasticsearch/benchmark
- script
- search/aggregations
- build-tools-internal/src/main/groovy
- distribution/tools
- geoip-cli/src/main/java/org/elasticsearch/geoip
- keystore-cli/src
- main/java/org/elasticsearch/common/settings
- test/java/org/elasticsearch
- bootstrap
- common/settings
- launchers/src
- main/java/org/elasticsearch/tools/launchers
- test/java/org/elasticsearch/tools/launchers
- plugin-cli/src
- main/java/org/elasticsearch/plugins
- test/java/org/elasticsearch/plugins
- modules
- geo/src/yamlRestTest/java/org/elasticsearch/geo
- kibana/src/javaRestTest/java/org/elasticsearch/kibana
- runtime-fields-common/src
- main/java/org/elasticsearch/runtimefields
- yamlRestTest/java/org/elasticsearch/painless
- qa
- os/src/test/java/org/elasticsearch/packaging
- test
- util
- wildfly/src/main/java/org/elasticsearch/wildfly
- model
- transport
- server/src
- internalClusterTest/java/org/elasticsearch/snapshots
- main/java/org/elasticsearch
- action/admin/cluster
- repositories
- cleanup
- put
- verify
- snapshots
- create
- features
- get
- restore
- status
- common/settings
- index/snapshots/blobstore
- repositories
- blobstore
- snapshots
- test/java/org/elasticsearch
- action/admin/cluster/snapshots/status
- index/snapshots/blobstore
- repositories
- blobstore
- fs
- snapshots
- test
- external-modules
- delayed-aggs/src/main/java/org/elasticsearch/search/aggregations
- error-query/src/main/java/org/elasticsearch/search/query
- fixtures
- azure-fixture/src/main/java/fixture/azure
- gcs-fixture/src/main/java/fixture/gcs
- s3-fixture/src/main/java/fixture/s3
- url-fixture/src/main/java/fixture/url
- x-pack
- plugin
- async-search/qa/rest/src/yamlRestTest/java/org/elasticsearch/qa
- autoscaling/src
- internalClusterTest/java/org/elasticsearch/xpack/autoscaling
- storage
- main/java/org/elasticsearch/xpack/autoscaling
- capacity
- policy
- storage
- test/java/org/elasticsearch/xpack/autoscaling
- action
- capacity
- memory
- storage
- util
- data-streams/src
- internalClusterTest/java/org/elasticsearch/datastreams
- main/java/org/elasticsearch/xpack/datastreams
- rest
- test/java/org/elasticsearch/xpack
- core/action
- datastreams
- action
- mapper
- deprecation/qa/rest/src
- javaRestTest/java/org/elasticsearch/xpack/deprecation
- main/java/org/elasticsearch/xpack/deprecation
- enrich
- qa
- rest-with-advanced-security/src/javaRestTest/java/org/elasticsearch/xpack/enrich
- rest/src/yamlRestTest/java/org/elasticsearch/xpack/enrich
- src
- internalClusterTest/java/org/elasticsearch/xpack/enrich
- main/java/org/elasticsearch/xpack/enrich
- action
- test/java/org/elasticsearch/xpack
- enrich
- monitoring/collector/enrich
- eql/qa/correctness/src/javaRestTest/java/org/elasticsearch/xpack/eql
- fleet/src
- internalClusterTest/java/org/elasticsearch/xpack/fleet/action
- main/java/org/elasticsearch/xpack/fleet/action
- frozen-indices/src/internalClusterTest/java/org/elasticsearch/index/engine/frozen
- logstash/src
- main/java/org/elasticsearch/xpack/logstash
- test/java/org/elasticsearch/xpack/logstash
- mapper-aggregate-metric/src
- main/java/org/elasticsearch/xpack/aggregatemetric/aggregations/metrics
- test/java/org/elasticsearch/xpack/aggregatemetric/aggregations/metrics
- mapper-unsigned-long/src
- main/java/org/elasticsearch/xpack/unsignedlong
- test/java/org/elasticsearch/xpack/unsignedlong
- mapper-version/src/main/java/org/elasticsearch/xpack/versionfield
- ql/test-fixtures/src/main/java/org/elasticsearch/xpack/ql
- repositories-metering-api/src/main/java/org/elasticsearch/xpack/repositories/metering/rest
- repository-encrypted/src
- main/java/org/elasticsearch/repositories/encrypted
- test/java/org/elasticsearch/repositories/encrypted
- searchable-snapshots
- qa/rest/src/yamlRestTest/java/org/elasticsearch/xpack/searchablesnapshots/rest
- src
- internalClusterTest/java/org/elasticsearch/xpack/searchablesnapshots
- allocation
- cache
- blob
- full
- recovery
- main/java/org/elasticsearch/xpack/searchablesnapshots
- action
- allocation
- cache
- blob
- common
- full
- store
- input
- test/java/org/elasticsearch/xpack/searchablesnapshots
- action
- cache
- common
- full
- store
- input
- security/qa/operator-privileges-tests/src/main/java/org/elasticsearch/xpack/security/operator
- shutdown/src/main/java/org/elasticsearch/xpack/shutdown
- snapshot-repo-test-kit/src
- internalClusterTest/java/org/elasticsearch/repositories/blobstore/testkit
- main/java/org/elasticsearch/repositories/blobstore/testkit
- sql/qa/server
- security/src/test/java/org/elasticsearch/xpack/sql/qa/security
- src/main/java/org/elasticsearch/xpack/sql/qa
- cli
- geo
- jdbc
- rest
- stack/src/test/java/org/elasticsearch/xpack/stack
- text-structure/src
- main/java/org/elasticsearch/xpack/textstructure/structurefinder
- test/java/org/elasticsearch/xpack/textstructure/structurefinder
- watcher/qa/common/src/main/java/org/elasticsearch/xpack/watcher
- quota-aware-fs/src/test/java/org/elasticsearch/fs/quotaaware
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
283 files changed
+660
-578
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
11 | 16 | | |
12 | 17 | | |
13 | 18 | | |
14 | 19 | | |
15 | 20 | | |
16 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
17 | 25 | | |
18 | 26 | | |
19 | 27 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
185 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
186 | 190 | | |
187 | 191 | | |
188 | 192 | | |
| |||
194 | 198 | | |
195 | 199 | | |
196 | 200 | | |
197 | | - | |
| 201 | + | |
| 202 | + | |
198 | 203 | | |
199 | 204 | | |
200 | 205 | | |
| |||
270 | 275 | | |
271 | 276 | | |
272 | 277 | | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
279 | 282 | | |
280 | 283 | | |
281 | 284 | | |
| |||
315 | 318 | | |
316 | 319 | | |
317 | 320 | | |
318 | | - | |
319 | | - | |
320 | | - | |
| 321 | + | |
321 | 322 | | |
322 | 323 | | |
323 | 324 | | |
324 | 325 | | |
325 | 326 | | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | 327 | | |
341 | 328 | | |
342 | 329 | | |
| |||
730 | 717 | | |
731 | 718 | | |
732 | 719 | | |
| 720 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
223 | 224 | | |
| 225 | + | |
224 | 226 | | |
225 | 227 | | |
226 | 228 | | |
227 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
228 | 240 | | |
229 | 241 | | |
230 | 242 | | |
| |||
Lines changed: 0 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | 107 | | |
113 | 108 | | |
114 | 109 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | | - | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
0 commit comments