Open oiuhr opened 2 weeks ago
Attention: Patch coverage is 99.43503%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 95.19%. Comparing base (
4433c16
) to head (eb89782
).
Files | Patch % | Lines |
---|---|---|
Sources/FormattingHelpers.swift | 99.10% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Current questions:
// MARK: Lifecycle
mark. Then we change up to custom mark, smth like // MARK: Init
and // MARK: Lifecycle
is replaced. But if we jump from custom to default formatter simply have nothing to compare and just place // MARK: Lifecycle
under previously used custom mark. Should we add something like --potentialCategoryMarks
to filter them out if needed?--visibilityorder
clearly should have 6+ entries in it, all of which should be unique and valid 💀 Is it okay if we cant filter out custom marks? For example: we were using default mark for instance lifecycle group, which was given an // MARK: Lifecycle mark. Then we change up to custom mark, smth like // MARK: Init and // MARK: Lifecycle is replaced. But if we jump from custom to default formatter simply have nothing to compare and just place // MARK: Lifecycle under previously used custom mark. Should we add something like --potentialCategoryMarks to filter them out if needed?
To me it seems fine to leave this as-is.
This PR adds an ability to parametrize order inside
organizeDeclarations
categories & their respective marks.I'm not sure about the design so it's up to discussion, but long story short:
We have 6 visibility categories (plus 2 for airbnb conventions, but i guess this number can increase without any major changes) and ~15 type groups. By providing parameters
--visibilityorder
we sort visibility categories (the same goes for thetypeorder
), and by--mode
parameter we tell which category will be respected as primary sorting group. Each group either take a defaultmark comment
value or custom parametrized with parameters--visibilitymark
&--typemark
, if provided.