rewrite-testing-frameworks icon indicating copy to clipboard operation
rewrite-testing-frameworks copied to clipboard

Chained AssertJ assertions should be simplified to the corresponding dedicated assertion

Open velo opened this issue 1 year ago • 1 comments

This is not ready yet, but working on it.

From time to time, I get toasted by a sonar code smell, and I decided to make something about it https://next.sonarqube.com/sonarqube/coding_rules?open=java%3AS5838&rule_key=java%3AS5838

What's changed?

For now, created a test for all rules and start implementing missing recipes.

For now, I'm creating a PR to ask questions.

What's your motivation?

Anything in particular you'd like reviewers to focus on?

Anyone you would like to review specifically?

Have you considered any alternatives or workarounds?

Any additional context

Checklist

  • [ ] I've added unit tests to cover both positive and negative cases
  • [ ] I've read and applied the recipe conventions and best practices
  • [ ] I've used the IntelliJ IDEA auto-formatter on affected files

velo avatar Jul 25 '24 01:07 velo

I will get them sorted

velo avatar Jul 25 '24 10:07 velo

Hi @velo, are you ok with me polishing this up and merging a smaller increment already? I'm thinking we comment out the failing cases and merge the already nice improvements on this branch.

timtebeek avatar Aug 10 '24 20:08 timtebeek

Hi @timtebeek

Sorry, I totally reduced the score of the change to make it a bite size change meant to be merged, but somehow forgot to write an update!

velo avatar Aug 11 '24 12:08 velo

Hi @timtebeek

Sorry, I totally reduced the score of the change to make it a bite size change meant to be merged, but somehow forgot to write an update!

Go for it

velo avatar Aug 11 '24 14:08 velo