Skip to content

chore(uiautomator2): remove escapeUIAutomatorString, which nothing calls any more - #200

Open
bulatgaleev wants to merge 1 commit into
devicelab-dev:mainfrom
vyrahealth:upstream-pr/lint-remove-unused-escape
Open

bulatgaleev wants to merge 1 commit into
devicelab-dev:mainfrom
vyrahealth:upstream-pr/lint-remove-unused-escape

Conversation

@bulatgaleev

Copy link
Copy Markdown
Contributor

Summary

CI has failed on every push to main since 30257df ("Android device queries match the whole text and id"). That commit removed the last caller of escapeUIAutomatorString in the uiautomator2 driver, and golangci-lint's unused check has flagged it ever since:

pkg/driver/uiautomator2/driver.go:1285:6: func escapeUIAutomatorString is unused (unused)

Lint is the only job that fails, and Build needs Lint, so Build is skipped on each of those runs. This removes the function.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)

Changes Made

  • Removes escapeUIAutomatorString and its comment from pkg/driver/uiautomator2/driver.go. Nothing else in the package calls it, tests included. The copies in the appium and devicelab drivers are untouched.

Related Issues

No existing issue found.

Testing

  • go build ./..., go vet ./... and go test -race ./pkg/driver/uiautomator2/... pass
  • golangci-lint v2.13.2, the version CI pins: on main at d3f738f it reports exactly this one issue; with this change it reports none
  • make test as a whole: not run, because its device tests drive whatever device is attached to the machine

Checklist

  • Code follows project style guidelines
  • Self-reviewed the code
  • Added/updated documentation as needed (no documentation change needed)
  • No breaking changes (or documented if breaking)
  • CHANGELOG.md updated (not needed: nothing a user can see changes)

Additional Notes

#194 to #199 are stacked on this one, so that their Lint check passes as well. Merge this one first.

Stack 1 of 7: #200 → #194 → #195 → #196 → #197 → #198 → #199. Merge in that order. This is the base of the stack; its change is 352d9f5. All seven sit on main at d3f738f (the merge of #185).

…lls any more

30257df (Android device queries match the whole text and id) took out the last
caller of this helper in the uiautomator2 driver. The unused linter has flagged
it since, so Lint has failed on every push to main, and Build, which needs
Lint, has been skipped each time. The same helper in the appium and devicelab
drivers is untouched.
@codecov

codecov Bot commented Oct 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

1 participant