error-prone-support icon indicating copy to clipboard operation
error-prone-support copied to clipboard

Update all tests to use text blocks

Open Stephan202 opened this issue 1 year ago • 19 comments

~Edit: PR #603 was spun off from this PR. That change should be merged and finalized first.~

Suggested commit message:

Update all tests to use text blocks (#198)

All `CompilationTestHelper` and `BugCheckerRefactoringTestHelper` test
code is now specified using a single text block. These changes were
automated thanks to the new text block support added to the 
`ErrorProneTestHelperSourceFormat` check, now renamed to
`TestHelperSourceFormat`.

Stephan202 avatar Aug 14 '22 13:08 Stephan202

Rebased and resolved conflicts.

Stephan202 avatar Nov 13 '22 13:11 Stephan202

The current state of the PR contains a Surefire upgrade, as it relied on functionality only available in a milestone release. This upgrade is now part of #532, to be merged first.

Stephan202 avatar Mar 15 '23 07:03 Stephan202

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 5 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarcloud[bot] avatar Apr 09 '23 08:04 sonarcloud[bot]

  • Surviving mutants in this change: 26
  • Killed mutants in this change: 56
class surviving killed
:zombie:tech.picnic.errorprone.bugpatterns.ErrorProneTestHelperSourceFormat 24 50
:zombie:tech.picnic.errorprone.bugpatterns.util.SourceCode 2 6

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

github-actions[bot] avatar Apr 26 '23 20:04 github-actions[bot]

I filed #603 for the Jabel build changes; once merged the scope of this PR will be reduced to just the CompilationTestHelper/BugCheckerRefactoringTestHelper text block formatting support.

Stephan202 avatar Apr 27 '23 17:04 Stephan202

Rebased, resolved conflicts, and made the changes more compatible with Jabel.

Stephan202 avatar Dec 17 '23 14:12 Stephan202

  • Surviving mutants in this change: 40
  • Killed mutants in this change: 218
class surviving killed
:zombie:tech.picnic.errorprone.bugpatterns.ErrorProneTestHelperSourceFormat 30 50
:zombie:tech.picnic.errorprone.bugpatterns.util.SourceCode 2 6
:zombie:tech.picnic.errorprone.bugpatterns.MethodReferenceUsage 2 17
:zombie:tech.picnic.errorprone.bugpatterns.SpringMvcAnnotation 1 9
:zombie:tech.picnic.errorprone.bugpatterns.util.AnnotationAttributeMatcher 1 2
:zombie:tech.picnic.errorprone.bugpatterns.PrimitiveComparison 1 14
:zombie:tech.picnic.errorprone.bugpatterns.CanonicalAnnotationSyntax 1 4
:zombie:tech.picnic.errorprone.bugpatterns.RefasterAnyOfUsage 1 8
:zombie:tech.picnic.errorprone.bugpatterns.LexicographicalAnnotationAttributeListing$1 1 1
:tada:tech.picnic.errorprone.bugpatterns.StaticImport 0 4
:tada:tech.picnic.errorprone.documentation.BugPatternTestExtractor$BugPatternTestCollector 0 8
:tada:tech.picnic.errorprone.refaster.test.RefasterRuleCollection 0 4
:tada:tech.picnic.errorprone.bugpatterns.RedundantStringConversion 0 9
:tada:tech.picnic.errorprone.bugpatterns.LexicographicalAnnotationAttributeListing 0 4
:tada:tech.picnic.errorprone.bugpatterns.JUnitValueSource 0 8
:tada:tech.picnic.errorprone.bugpatterns.NonStaticImport 0 2
:tada:tech.picnic.errorprone.bugpatterns.DirectReturn 0 9
:tada:tech.picnic.errorprone.bugpatterns.FormatStringConcatenation$ReplacementArgumentsConstructor 0 2
:tada:tech.picnic.errorprone.refaster.matchers.ThrowsCheckedException 0 6
:tada:tech.picnic.errorprone.refaster.runner.Refaster 0 2
:tada:tech.picnic.errorprone.bugpatterns.AmbiguousJsonCreator 0 2
:tada:tech.picnic.errorprone.bugpatterns.MockitoMockClassReference 0 8
:tada:tech.picnic.errorprone.bugpatterns.util.MoreJUnitMatchers 0 4
:tada:tech.picnic.errorprone.bugpatterns.IsInstanceLambdaUsage 0 4
:tada:tech.picnic.errorprone.refaster.matchers.IsEmpty 0 2
:tada:tech.picnic.errorprone.refaster.matchers.IsLikelyTrivialComputation 0 29

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

github-actions[bot] avatar Dec 17 '23 14:12 github-actions[bot]

  • Surviving mutants in this change: 32
  • Killed mutants in this change: 56
class surviving killed
:zombie:tech.picnic.errorprone.bugpatterns.ErrorProneTestHelperSourceFormat 30 50
:zombie:tech.picnic.errorprone.bugpatterns.util.SourceCode 2 6

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

github-actions[bot] avatar Dec 26 '23 20:12 github-actions[bot]

  • Surviving mutants in this change: 32
  • Killed mutants in this change: 56
class surviving killed
:zombie:tech.picnic.errorprone.bugpatterns.ErrorProneTestHelperSourceFormat 30 50
:zombie:tech.picnic.errorprone.bugpatterns.util.SourceCode 2 6

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

github-actions[bot] avatar Jan 01 '24 19:01 github-actions[bot]

  • Surviving mutants in this change: 32
  • Killed mutants in this change: 56
class surviving killed
:zombie:tech.picnic.errorprone.bugpatterns.ErrorProneTestHelperSourceFormat 30 50
:zombie:tech.picnic.errorprone.bugpatterns.util.SourceCode 2 6

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

github-actions[bot] avatar Jan 15 '24 05:01 github-actions[bot]

Rebased and resolved conflicts and other issues. The PR now targets master. Next up would be to get the code in a reviewable state, primarily by extending test coverage. One other key decision to make, is whether to keep support for the "don't use text blocks" mode. During development this has been very helpful, so perhaps we should keep it for now, but over time I expect that this functionality will become disused. (Though I suppose it'll simplify contributing checks upstream.)

NB: I added a commit with a proposal to rename the check. I've updated the suggested commit message accordingly.

Stephan202 avatar Feb 11 '24 16:02 Stephan202

  • Surviving mutants in this change: 33
  • Killed mutants in this change: 74
class surviving killed
:zombie:tech.picnic.errorprone.guidelines.bugpatterns.TestHelperSourceFormat 31 68
:zombie:tech.picnic.errorprone.utils.SourceCode 2 6

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

github-actions[bot] avatar Feb 11 '24 16:02 github-actions[bot]

  • Surviving mutants in this change: 33
  • Killed mutants in this change: 74
class surviving killed
:zombie:tech.picnic.errorprone.guidelines.bugpatterns.TestHelperSourceFormat 31 68
:zombie:tech.picnic.errorprone.utils.SourceCode 2 6

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

github-actions[bot] avatar Mar 17 '24 11:03 github-actions[bot]

  • Surviving mutants in this change: 38
  • Killed mutants in this change: 71
class surviving killed
:zombie:tech.picnic.errorprone.guidelines.bugpatterns.TestHelperSourceFormat 31 63
:zombie:tech.picnic.errorprone.utils.SourceCode 7 6
:tada:tech.picnic.errorprone.documentation.BugPatternTestExtractor$BugPatternTestCollector 0 2

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

github-actions[bot] avatar Mar 23 '24 20:03 github-actions[bot]

  • Surviving mutants in this change: 38
  • Killed mutants in this change: 71
class surviving killed
:zombie:tech.picnic.errorprone.guidelines.bugpatterns.TestHelperSourceFormat 31 63
:zombie:tech.picnic.errorprone.utils.SourceCode 7 6
:tada:tech.picnic.errorprone.documentation.BugPatternTestExtractor$BugPatternTestCollector 0 2

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

github-actions[bot] avatar Mar 23 '24 22:03 github-actions[bot]

  • Surviving mutants in this change: 38
  • Killed mutants in this change: 71
class surviving killed
:zombie:tech.picnic.errorprone.guidelines.bugpatterns.TestHelperSourceFormat 31 63
:zombie:tech.picnic.errorprone.utils.SourceCode 7 6
:tada:tech.picnic.errorprone.documentation.BugPatternTestExtractor$BugPatternTestCollector 0 2

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

github-actions[bot] avatar Mar 23 '24 22:03 github-actions[bot]