@@ -20,8 +20,8 @@ static void UnregisterLinter(Linter* linter) {
2020LintError::LintError (
2121 const std::string& description,
2222 const std::set<std::filesystem::path>& affectedLayers)
23- : mDescription (description), mAffectedLayers (affectedLayers) {
24- }
23+ : mDescription (description),
24+ mAffectedLayers (affectedLayers) { }
2525
2626std::string LintError::GetDescription () const {
2727 return mDescription ;
@@ -46,7 +46,7 @@ std::vector<std::shared_ptr<LintError>> RunAllLinters(
4646
4747 std::vector<std::tuple<APILayer, APILayerDetails>> layersWithDetails;
4848 for (const auto & layer: layers) {
49- layersWithDetails.push_back ({layer, {layer.mJSONPath }});
49+ layersWithDetails.push_back ({layer, {layer.mManifestPath }});
5050 }
5151
5252 auto it = std::back_inserter (errors);
@@ -69,24 +69,25 @@ OrderingLintError::OrderingLintError(
6969 : allAffectedLayers),
7070 mLayerToMove (layerToMove),
7171 mPosition (position),
72- mRelativeTo (relativeTo) {
73- }
72+ mRelativeTo (relativeTo) {}
7473
7574std::vector<APILayer> OrderingLintError::Fix (
7675 const std::vector<APILayer>& oldLayers) {
7776 auto newLayers = oldLayers;
7877
79- auto moveIt = std::ranges::find_if (
80- newLayers, [this ](const auto & it) { return it.mJSONPath == mLayerToMove ; });
78+ auto moveIt = std::ranges::find_if (newLayers, [this ](const auto & it) {
79+ return it.mManifestPath == mLayerToMove ;
80+ });
8181
8282 if (moveIt == newLayers.end ()) {
8383 return oldLayers;
8484 }
8585 const auto movedLayer = *moveIt;
8686 newLayers.erase (moveIt);
8787
88- auto anchorIt = std::ranges::find_if (
89- newLayers, [this ](const auto & it) { return it.mJSONPath == mRelativeTo ; });
88+ auto anchorIt = std::ranges::find_if (newLayers, [this ](const auto & it) {
89+ return it.mManifestPath == mRelativeTo ;
90+ });
9091
9192 if (anchorIt == newLayers.end ()) {
9293 return oldLayers;
@@ -107,8 +108,7 @@ std::vector<APILayer> OrderingLintError::Fix(
107108KnownBadLayerLintError::KnownBadLayerLintError (
108109 const std::string& description,
109110 const std::filesystem::path& layer)
110- : FixableLintError(description, {layer}) {
111- }
111+ : FixableLintError(description, {layer}) {}
112112
113113std::vector<APILayer> KnownBadLayerLintError::Fix (
114114 const std::vector<APILayer>& allLayers) {
@@ -118,7 +118,7 @@ std::vector<APILayer> KnownBadLayerLintError::Fix(
118118
119119 auto newLayers = allLayers;
120120 auto it = std::ranges::find_if (
121- newLayers, [&path](const auto & layer) { return layer.mJSONPath == path; });
121+ newLayers, [&path](const auto & layer) { return layer.mManifestPath == path; });
122122
123123 if (it != newLayers.end ()) {
124124 it->mValue = APILayer::Value::Disabled;
@@ -129,8 +129,7 @@ std::vector<APILayer> KnownBadLayerLintError::Fix(
129129InvalidLayerLintError::InvalidLayerLintError (
130130 const std::string& description,
131131 const std::filesystem::path& layer)
132- : FixableLintError(description, {layer}) {
133- }
132+ : FixableLintError(description, {layer}) {}
134133
135134std::vector<APILayer> InvalidLayerLintError::Fix (
136135 const std::vector<APILayer>& allLayers) {
@@ -140,7 +139,7 @@ std::vector<APILayer> InvalidLayerLintError::Fix(
140139
141140 auto newLayers = allLayers;
142141 auto it = std::ranges::find_if (
143- newLayers, [&path](const auto & layer) { return layer.mJSONPath == path; });
142+ newLayers, [&path](const auto & layer) { return layer.mManifestPath == path; });
144143
145144 if (it != newLayers.end ()) {
146145 newLayers.erase (it);
@@ -151,8 +150,7 @@ std::vector<APILayer> InvalidLayerLintError::Fix(
151150InvalidLayerStateLintError::InvalidLayerStateLintError (
152151 const std::string& description,
153152 const std::filesystem::path& layer)
154- : FixableLintError(description, {layer}) {
155- }
153+ : FixableLintError(description, {layer}) {}
156154
157155std::vector<APILayer> InvalidLayerStateLintError::Fix (
158156 const std::vector<APILayer>& allLayers) {
@@ -162,7 +160,7 @@ std::vector<APILayer> InvalidLayerStateLintError::Fix(
162160
163161 auto newLayers = allLayers;
164162 auto it = std::ranges::find_if (
165- newLayers, [&path](const auto & layer) { return layer.mJSONPath == path; });
163+ newLayers, [&path](const auto & layer) { return layer.mManifestPath == path; });
166164
167165 if (it != newLayers.end ()) {
168166 it->mValue = APILayer::Value::Disabled;
0 commit comments