Skip to content

Commit 8897c15

Browse files
committed
828: rename inspection titles
1 parent e4be0b9 commit 8897c15

15 files changed

+49
-37
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1439] Call Adobe Commerce @deprecated method: The deprecated method will be removed in upcoming versions. Consider relying on methods declared in API interfaces instead.</p>
3+
<p>[1439] Call Magento Open Source|Adobe Commerce @deprecated method: The deprecated method will be removed in upcoming versions. Consider relying on methods declared in API interfaces instead.</p>
44
<!-- tooltip end -->
55
</body>
66
</html>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1131] Extending from Adobe Commerce @deprecated class: The extended class will be removed in upcoming versions. Inheritance is not recommended way of extending Adobe Commerce functionality. Update code to use a class marked as @api.</p>
3+
<p>[1131] Extending from Magento Open Source|Adobe Commerce @deprecated class: The extended class will be removed in upcoming versions. Inheritance is not recommended way of extending Magento Open Source|Adobe Commerce functionality. Update code to use a class marked as @api.</p>
44
<!-- tooltip end -->
55
</body>
66
</html>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1338] Implemented Adobe Commerce @deprecated interface: The deprecated interface will be removed in upcoming versions. Consider removing the interface inheritance, using an interface marked as @api or an interface introduced within your implementation instead.</p>
3+
<p>[1338] Implemented Magento Open Source|Adobe Commerce @deprecated interface: The deprecated interface will be removed in upcoming versions. Consider removing the interface inheritance, using an interface marked as @api or an interface introduced within your implementation instead.</p>
44
<!-- tooltip end -->
55
</body>
66
</html>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1132] Importing Adobe Commerce @deprecated class: The extended class will be removed in upcoming versions. Consider using Adobe Commerce class marked as @api instead.</p>
3+
<p>[1132] Importing Magento Open Source|Adobe Commerce @deprecated class: The extended class will be removed in upcoming versions. Consider using Magento Open Source|Adobe Commerce class marked as @api instead.</p>
44
<!-- tooltip end -->
55
</body>
66
</html>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1332] Imported Adobe Commerce @deprecated interface: The deprecated interface will be removed in upcoming versions. Consider using an interface or class marked as @api instead.</p>
3+
<p>[1332] Imported Magento Open Source|Adobe Commerce @deprecated interface: The deprecated interface will be removed in upcoming versions. Consider using an interface or class marked as @api instead.</p>
44
<!-- tooltip end -->
55
</body>
66
</html>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1337] Inherited from Adobe Commerce @deprecated interface: The deprecated interface will be removed in upcoming versions. Consider removing the interface inheritance, using an interface marked as @api or an interface introduced within your implementation instead.</p>
3+
<p>[1337] Inherited from Magento Open Source|Adobe Commerce @deprecated interface: The deprecated interface will be removed in upcoming versions. Consider removing the interface inheritance, using an interface marked as @api or an interface introduced within your implementation instead.</p>
44
<!-- tooltip end -->
55
</body>
66
</html>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1235] Overriding Adobe Commerce @deprecated constant: The deprecated constant will be removed in upcoming versions. Consider using a constant marked as @api or a private constant within your implementation instead.</p>
3+
<p>[1235] Overriding Magento Open Source|Adobe Commerce @deprecated constant: The deprecated constant will be removed in upcoming versions. Consider using a constant marked as @api or a private constant within your implementation instead.</p>
44
<!-- tooltip end -->
55
</body>
66
</html>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1535] Overriding Adobe Commerce @deprecated property: The deprecated property will be removed in upcoming versions. Consider relying on methods declared in API interfaces or using a private property within your implementation instead.</p>
3+
<p>[1535] Overriding Magento Open Source|Adobe Commerce @deprecated property: The deprecated property will be removed in upcoming versions. Consider relying on methods declared in API interfaces or using a private property within your implementation instead.</p>
44
<!-- tooltip end -->
55
</body>
66
</html>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1134] Using Adobe Commerce @deprecated class: The extended class will be removed in upcoming versions. Consider using Adobe Commerce class marked as @api instead.</p>
3+
<p>[1134] Using Magento Open Source|Adobe Commerce @deprecated class: The extended class will be removed in upcoming versions. Consider using Magento Open Source|Adobe Commerce class marked as @api instead.</p>
44
<!-- tooltip end -->
55
</body>
66
</html>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1234] Using Adobe Commerce @deprecated constant: The deprecated constant will be removed in upcoming versions. Consider using a constant marked as @api or a private constant within your implementation instead.</p>
3+
<p>[1234] Using Magento Open Source|Adobe Commerce @deprecated constant: The deprecated constant will be removed in upcoming versions. Consider using a constant marked as @api or a private constant within your implementation instead.</p>
44
<!-- tooltip end -->
55
</body>
66
</html>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1334] Used Adobe Commerce @deprecated interface: The deprecated interface will be removed in upcoming versions. Consider using an interface or class marked as @api instead.</p>
3+
<p>[1334] Used Magento Open Source|Adobe Commerce @deprecated interface: The deprecated interface will be removed in upcoming versions. Consider using an interface or class marked as @api instead.</p>
44
<!-- tooltip end -->
55
</body>
66
</html>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1534] Using Adobe Commerce @deprecated property: The deprecated method will be removed in upcoming versions. Consider relying on methods declared in API interfaces instead.</p>
3+
<p>[1534] Using Magento Open Source|Adobe Commerce @deprecated property: The deprecated method will be removed in upcoming versions. Consider relying on methods declared in API interfaces instead.</p>
44
<!-- tooltip end -->
55
</body>
66
</html>

resources/uct/bundle/inspection.properties

+22-22
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,28 @@ inspection.displayName.InheritedDeprecatedInterface=Inherited from @deprecated i
1414
inspection.displayName.ImplementedDeprecatedInterface=Implemented @deprecated interface
1515
inspection.displayName.CallingDeprecatedMethod=Call @deprecated method
1616
inspection.displayName.UsingDeprecatedProperty=Using @deprecated property
17-
inspection.displayName.ImportingNonExistentClass=Importing non-existent Adobe Commerce class
18-
inspection.displayName.ImportingNonExistentInterface=Importing non-existent Adobe Commerce interface
19-
inspection.displayName.InheritedNonExistentInterface=Inherited non-existent Adobe Commerce interface
20-
inspection.displayName.ImplementedNonExistentInterface=Implemented non-existent Adobe Commerce interface
21-
inspection.displayName.ExtendedNonExistentClass=Extended non-existent Adobe Commerce class
22-
inspection.displayName.OverriddenNonExistentConstant=Overridden non-existent Adobe Commerce constant
23-
inspection.displayName.OverriddenNonExistentProperty=Overridden non-existent Adobe Commerce property
24-
inspection.displayName.CalledNonExistentMethod=Call non-existent Adobe Commerce method
25-
inspection.displayName.UsedNonExistentType=Used non-existent Adobe Commerce type
26-
inspection.displayName.UsedNonExistentConstant=Used non-existent Adobe Commerce constant
27-
inspection.displayName.UsedNonExistentProperty=Used non-existent Adobe Commerce property
28-
inspection.displayName.ImportedNonApiClass=Imported non Adobe Commerce API class
29-
inspection.displayName.ImportedNonApiInterface=Imported non Adobe Commerce API interface
30-
inspection.displayName.CalledNonApiMethod=Called non Adobe Commerce API method
31-
inspection.displayName.OverriddenNonApiConstant=Overridden non Adobe Commerce API constant
32-
inspection.displayName.OverriddenNonApiProperty=Overridden non Adobe Commerce API property
33-
inspection.displayName.UsedNonApiConstant=Used non Adobe Commerce API constant
34-
inspection.displayName.UsedNonApiProperty=Used non Adobe Commerce API property
35-
inspection.displayName.UsedNonApiType=Used non Adobe Commerce API type
36-
inspection.displayName.ImplementedNonApiInterface=Implemented non Adobe Commerce API interface
37-
inspection.displayName.ExtendedNonApiClass=Extended non Adobe Commerce API class
38-
inspection.displayName.InheritedNonApiInterface=Inherited non Adobe Commerce API interface
17+
inspection.displayName.ImportingNonExistentClass=Importing non-existent Magento Open Source|Adobe Commerce class
18+
inspection.displayName.ImportingNonExistentInterface=Importing non-existent Magento Open Source|Adobe Commerce interface
19+
inspection.displayName.InheritedNonExistentInterface=Inherited non-existent Magento Open Source|Adobe Commerce interface
20+
inspection.displayName.ImplementedNonExistentInterface=Implemented non-existent Magento Open Source|Adobe Commerce interface
21+
inspection.displayName.ExtendedNonExistentClass=Extended non-existent Magento Open Source|Adobe Commerce class
22+
inspection.displayName.OverriddenNonExistentConstant=Overridden non-existent Magento Open Source|Adobe Commerce constant
23+
inspection.displayName.OverriddenNonExistentProperty=Overridden non-existent Magento Open Source|Adobe Commerce property
24+
inspection.displayName.CalledNonExistentMethod=Call non-existent Magento Open Source|Adobe Commerce method
25+
inspection.displayName.UsedNonExistentType=Used non-existent Magento Open Source|Adobe Commerce type
26+
inspection.displayName.UsedNonExistentConstant=Used non-existent Magento Open Source|Adobe Commerce constant
27+
inspection.displayName.UsedNonExistentProperty=Used non-existent Magento Open Source|Adobe Commerce property
28+
inspection.displayName.ImportedNonApiClass=Imported non Magento Open Source|Adobe Commerce API class
29+
inspection.displayName.ImportedNonApiInterface=Imported non Magento Open Source|Adobe Commerce API interface
30+
inspection.displayName.CalledNonApiMethod=Called non Magento Open Source|Adobe Commerce API method
31+
inspection.displayName.OverriddenNonApiConstant=Overridden non Magento Open Source|Adobe Commerce API constant
32+
inspection.displayName.OverriddenNonApiProperty=Overridden non Magento Open Source|Adobe Commerce API property
33+
inspection.displayName.UsedNonApiConstant=Used non Magento Open Source|Adobe Commerce API constant
34+
inspection.displayName.UsedNonApiProperty=Used non Magento Open Source|Adobe Commerce API property
35+
inspection.displayName.UsedNonApiType=Used non Magento Open Source|Adobe Commerce API type
36+
inspection.displayName.ImplementedNonApiInterface=Implemented non Magento Open Source|Adobe Commerce API interface
37+
inspection.displayName.ExtendedNonApiClass=Extended non Magento Open Source|Adobe Commerce API class
38+
inspection.displayName.InheritedNonApiInterface=Inherited non Magento Open Source|Adobe Commerce API interface
3939
inspection.displayName.PossibleDependencyOnImplDetails=Possible dependency on implementation details
4040
inspection.displayName.CalledNonInterfaceMethod=Called non-interface method
4141
customCode.warnings.deprecated.1131=[1131] Extended class ''{0}'' that is @deprecated in the ''{1}''

src/com/magento/idea/magento2uct/execution/GenerateUctReportCommand.java

+12-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import com.intellij.psi.PsiFile;
2121
import com.intellij.psi.PsiManager;
2222
import com.jetbrains.php.lang.psi.PhpFile;
23+
import com.magento.idea.magento2plugin.util.magento.MagentoVersionUtil;
2324
import com.magento.idea.magento2uct.execution.output.ReportBuilder;
2425
import com.magento.idea.magento2uct.execution.output.Summary;
2526
import com.magento.idea.magento2uct.execution.output.UctReportOutputUtil;
@@ -36,12 +37,15 @@
3637
import com.magento.idea.magento2uct.util.inspection.SortDescriptorResultsUtil;
3738
import java.nio.file.Paths;
3839
import java.util.List;
40+
import com.intellij.openapi.util.Pair;
3941
import org.jetbrains.annotations.NotNull;
4042
import org.jetbrains.annotations.Nullable;
4143

4244
@SuppressWarnings({"PMD.NPathComplexity", "PMD.ExcessiveImports", "PMD.CognitiveComplexity"})
4345
public class GenerateUctReportCommand {
4446

47+
private static final String DEFAULT_MAGENTO_EDITION_LABEL = "Magento Open Source";
48+
4549
private final Project project;
4650
private final OutputWrapper output;
4751
private final ProcessHandler process;
@@ -99,6 +103,13 @@ public void execute() {
99103
);
100104
final ReportBuilder reportBuilder = new ReportBuilder(project);
101105
final UctReportOutputUtil outputUtil = new UctReportOutputUtil(output);
106+
final Pair<String, String> version = MagentoVersionUtil.getVersionData(
107+
project,
108+
project.getBasePath()
109+
);
110+
final String resolvedEdition = version.getSecond() == null
111+
? DEFAULT_MAGENTO_EDITION_LABEL
112+
: version.getSecond();
102113

103114
ApplicationManager.getApplication().executeOnPooledThread(() -> {
104115
ApplicationManager.getApplication().runReadAction(() -> {
@@ -154,7 +165,7 @@ public void execute() {
154165
}
155166
summary.trackProcessFinished();
156167
summary.setProcessedModules(scanner.getModuleCount());
157-
outputUtil.printSummary(summary);
168+
outputUtil.printSummary(summary, resolvedEdition);
158169

159170
if (summary.getProcessedModules() == 0) {
160171
process.destroyProcess();

src/com/magento/idea/magento2uct/execution/output/UctReportOutputUtil.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,10 @@ public void printIssue(final @NotNull ProblemDescriptor descriptor, final int co
7878
* Print summary information.
7979
*
8080
* @param summary Summary
81+
* @param platformName String
8182
*/
8283
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
83-
public void printSummary(final Summary summary) {
84+
public void printSummary(final Summary summary, final String platformName) {
8485
if (summary.getProcessedModules() == 0) {
8586
stdout.print(stdout.wrapInfo("Couldn't find modules to analyse").concat("\n"));
8687
return;
@@ -92,7 +93,7 @@ public void printSummary(final Summary summary) {
9293

9394
final Map<String, String> summaryMap = new LinkedHashMap<>();
9495
summaryMap.put("Installed version", summary.getInstalledVersion());
95-
summaryMap.put("Adobe Commerce version", summary.getTargetVersion());
96+
summaryMap.put(platformName + " version", summary.getTargetVersion());
9697
summaryMap.put("Running time", summary.getProcessRunningTime());
9798
summaryMap.put("Checked modules", String.valueOf(summary.getProcessedModules()));
9899
summaryMap.put("Total warnings found", String.valueOf(summary.getPhpWarnings()));

0 commit comments

Comments
 (0)