Commit 4f4be5d
committed
Only disable wrapping in import decls when it is safe to do so.
The ImportDeclSyntax attributes might include IfConfigDecls, which
absolutely require line breaks in certain positions. The disable
breaking logic of ImportDecl was preventing these from being emitted.1 parent fca02c2 commit 4f4be5d
File tree
2 files changed
+30
-14
lines changed- Sources/SwiftFormat/PrettyPrint
- Tests/SwiftFormatTests/PrettyPrint
2 files changed
+30
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1492 | 1492 | | |
1493 | 1493 | | |
1494 | 1494 | | |
1495 | | - | |
| 1495 | + | |
1496 | 1496 | | |
1497 | 1497 | | |
1498 | 1498 | | |
| |||
1951 | 1951 | | |
1952 | 1952 | | |
1953 | 1953 | | |
1954 | | - | |
1955 | | - | |
1956 | | - | |
1957 | | - | |
1958 | | - | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
1959 | 1965 | | |
1960 | 1966 | | |
1961 | 1967 | | |
1962 | 1968 | | |
1963 | 1969 | | |
1964 | | - | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
1965 | 1976 | | |
1966 | 1977 | | |
1967 | 1978 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
| |||
482 | 482 | | |
483 | 483 | | |
484 | 484 | | |
485 | | - | |
| 485 | + | |
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
| |||
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
513 | | - | |
| 513 | + | |
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
566 | 570 | | |
567 | 571 | | |
568 | | - | |
| 572 | + | |
569 | 573 | | |
570 | 574 | | |
| 575 | + | |
571 | 576 | | |
572 | 577 | | |
573 | 578 | | |
| |||
0 commit comments