Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev: add Eastwood linting #573

Merged
merged 3 commits into from
May 15, 2024
Merged

dev: add Eastwood linting #573

merged 3 commits into from
May 15, 2024

Conversation

lread
Copy link
Collaborator

@lread lread commented May 12, 2024

For some other Etaoin wip, I wanted to address some reflection warnings for new code and noticed we did not have any existing checks for reflection. I find Eastwood helps out with this nicely.

In addition to reflection warnings, I also addressed some other issues Eastwood reported:

  • A booboo in a test assertion for etaoin.unit.unit-test/test-chrome-profile.
    Fixed!
  • URL constructors are deprecated, starting with JDK 20. I switched to using lambdaisland/uri.
  • it noticed is assert messages that were not obviously strings. I ^String type hinted the message generating fn.
  • it thought string "always" for a constant truthy looked suspicious. I switched to the more conventional :always.
  • several tests had empty assertions like (is true "text found") or (is 1).
    Perhaps some linter once warned about a test without assertions? We don't have such a thing today, so I turfed these meaningless assertions. The unwritten assertion for these tests is that they do not throw an exception.

Please complete and include the following checklist:

  • I have read CONTRIBUTING and the Etaoin Developer Guide.

  • This PR corresponds to an issue that the Etaoin maintainers have agreed to address.

  • This PR contains test(s) to protect against future regressions

  • I have updated CHANGELOG.adoc with a description of the addressed issue.

lread added 3 commits May 12, 2024 10:57
For some other Etaoin wip, I wanted to address some reflection
warnings for new code and noticed we did not have any existing checks
for reflection. I find Eastwood helps out with this nicely.

In addition to reflection warnings, I also addressed some other issues
Eastwood reported:
- A booboo in a test assertion for
`etaoin.unit.unit-test/test-chrome-profile`.
Fixed!
- URL constructors are deprecated, starting with JDK 20.
I switched to using lambdaisland/uri.
- it noticed `is` assert messages that were not obviously strings.
I ^String type hinted the message generating fn.
- it thought string `"always"` for a constant truthy looked suspicious.
I switched to the more conventional `:always`.
- several tests had empty assertions like `(is true "text found")` or
`(is 1)`.
Perhaps some linter once warned about a test without assertions? We
don't have such a thing today, so I turfed these meaningless assertions.
The unwritten assertion for these tests is that they do not throw an
exception.
* master:
  tests: fix window switch tests (#581)
  dev: add `--host` to `dev:bb` and `dev:jvm` tasks (#580)
  Remove chrome's `--no-sandbox` from tests (#576)
- add some kondo lib config brought in by kondo
- git ignore .eastwood dir
@lread lread merged commit 6453b30 into master May 15, 2024
51 of 53 checks passed
@lread lread deleted the lread-eastwood branch July 28, 2024 18:14
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