You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simplify offense data model by removing adapter pattern (#63)
Remove the adapter classes (PackageAdapter, ConstantAdapter,
ReferenceAdapter, LocationAdapter) from PksOffense that existed solely
to make it compatible with Packwerk::ReferenceOffense interface.
Instead, use PksOffense's direct properties throughout:
- offense.constant_name instead of offense.reference.constant.name
- offense.file instead of offense.reference.relative_path
- offense.line instead of offense.location.line
- offense.defining_pack_name instead of offense.reference.constant.package.name
Update Check::OffensesFormatter interface to accept PksOffense directly
instead of Packwerk::ReferenceOffense, and update DefaultFormatter to
resolve constant locations via Private.constant_resolver.
Closes dp-5q5
0 commit comments