Skip to content

Add MIG-018: detect ExtentReports usage in code (#37) - #43

Closed
Contributerr27 wants to merge 3 commits into
seleniumboot:mainfrom
Contributerr27:feat/mig-018-extentreports
Closed

Contributerr27 wants to merge 3 commits into
seleniumboot:mainfrom
Contributerr27:feat/mig-018-extentreports

Conversation

@Contributerr27

Copy link
Copy Markdown
Contributor

What & why

Closes #37.

The analyzer already flagged ExtentReports when it appears in build files, but not when a project uses it in code. This adds MIG-018: creations and declarations of ExtentReports, ExtentTest and ExtentSparkReporter are now detected and reported as MANUAL findings (ExtentReports setup needs manual migration). Each class is reported at most once per file, following the MIG-014 pattern.

How tested

  • New detectsExtentReportsUsage test in AnalyzerTest: a source file using all three Extent classes (with both an object creation and a plain declaration of the same class, to cover dedup) yields exactly 3 findings with ruleId MIG-018, and a TestNG-only file yields none.
  • mvn test: all 70 tests pass.

The analyzer flagged ExtentReports in build files but not in code. Detect creations and declarations of ExtentReports, ExtentTest and ExtentSparkReporter as MANUAL findings, each once, following the MIG-014 pattern.

Closes seleniumboot#37
@shossain786

Copy link
Copy Markdown
Contributor

Thanks @Contributerr27. #37 was already assigned to @Jennydou517 and her PR #39 has now merged, so I'm closing this one as a duplicate. Please comment on an issue and wait to be assigned before opening a PR, so work doesn't overlap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detect ExtentReports usage in code (MIG-018)

2 participants