DefaultTypeAnnotationMetadataStoreTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fix more tests

    • -5
    • +5
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 12 more files in changeset.
Fix path sensitivity for property declarations in tests

    • -1
    • +1
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 8 more files in changeset.
Consolidate the way we end validation warnings with a period

    • -30
    • +21
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 4 more files in changeset.
Correctly report everything

    • -3
    • +8
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 20 more files in changeset.
Consolidate type validation

Use ValidateContext with a few standard implementations instead of the many different interfaces and implementations we used to collect valdiation problems before. This fixes issues with types being displayed inconsistently.

The implementation is not fully correct yet: we now fail to display the correct type for problems that are bound to a type instead of a property.

    • -19
    • +5
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 47 more files in changeset.
Explicitly return no annotation metadata for primitive types, arrays and annotations

    • -0
    • +11
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 1 more file in changeset.
Ignore supported script language base packages for property inspection

We don't want to inspect any of the types from java.*, groovy.* or kotlin.*.

    • -1
    • +7
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 8 more files in changeset.
Rename ParameterValidationContext to WorkValidationContext

    • -2
    • +2
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 41 more files in changeset.
Make annotations inherited from interface take precedence over… (#10472)

Make annotations inherited from interface take precedence over superclass

    • -4
    • +18
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
Merge branch 'master'

    • -6
    • +39
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 5 more files in changeset.
Merge branch 'master' into lptr/model/interface-annotations-take-precedence-over-superclass

    • -6
    • +39
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 1 more file in changeset.
Revert "Make it a strict error if a method is both replaced and declares a type"

This reverts commit ae4f4169cb1130345dcdf78d52a0ebc3747a299c.

    • -2
    • +2
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 3 more files in changeset.
Make annotations inherited from interface take precedence over superclass

    • -4
    • +18
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 1 more file in changeset.
Make it a strict error if a method is both replaced and declares a type

    • -2
    • +2
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 3 more files in changeset.
Split test into two

    • -3
    • +16
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
Fix typo

    • -2
    • +2
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
Ignore methods annotated with ReplacedBy

    • -1
    • +21
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 11 more files in changeset.
Rename visit{Error -> Warning} and visit{ErrorStrict -> Error}

    • -4
    • +4
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 15 more files in changeset.
Improve warning message for mutable properties

    • -3
    • +3
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 2 more files in changeset.
Simplify `DefaultTypeAnnotationMetadataStore#validateSetterForMutableType` using the newly defined non-generic `propertyNameFor`

    • -3
    • +34
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 3 more files in changeset.
Add `PropertyValidationAccess#validateMutableNonFinalField` to encourage final fields in tasks

    • -13
    • +7
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 8 more files in changeset.
Test for conflicting annotations on field and method

    • -1
    • +19
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
Make the detection of Groovy-generated getters generic

We don't want DefaultTypeAnnotationMetadataStore to depend directly on Groovy. Instead, we can inject code that detects Groovy generated 'is'-getters.

    • -0
    • +3
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 8 more files in changeset.
Handle cases when we have both 'is'-getters and 'get'-getters

Groovy generates both an 'is' and a 'get'-getter for boolean properties, and we shouldn't warn in this case. However, if the user defines both getter methods, we should require at least one of them to be explicitly ignored.

We need to figure out which method we need to call to get the value of the property. In the Groovy-generated case we can safely pick the 'get'-getter, because they both do exactly the same. In the user-specified case we need to be told which (if any) to use, as we have no means to make this decision on our own.

    • -0
    • +49
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 3 more files in changeset.
Test warning when ignored property has other annotations

    • -0
    • +15
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 1 more file in changeset.
Test warnings for annotated non-getter methods

    • -0
    • +24
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 1 more file in changeset.
Handle Inject annotation on fields

Unlike other property type annotations, we allow `@Inject` to be present on fields without a getter.

    • -2
    • +30
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 2 more files in changeset.
Fix tests

Also report type validation problems in a nicer way.

    • -0
    • +7
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 3 more files in changeset.
Scan methods first

    • -43
    • +36
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 23 more files in changeset.
Intermediate step to method-based annotation metadata collection

    • -6
    • +8
    ./DefaultTypeAnnotationMetadataStoreTest.groovy
  1. … 30 more files in changeset.