picimako / terra-support

Adds support for Cerner's Terra UI component and test automation libraries.
https://plugins.jetbrains.com/plugin/15430-terra-support
Apache License 2.0
0 stars 0 forks source link

False positive inspection result when reporting array-type viewport arguments in Terra.describeViewports #48

Closed picimako closed 3 years ago

picimako commented 3 years ago

Steps to reproduce

The TerraDescribeViewportsBlockingInspection reports when the viewports arguments in a Terra.describeViewports is not an array, however it may be extracted to a constant/variable or retrieved from somewhere else too.

  1. Create a constant and set it to an array of viewport values, e.g. ['tiny','huge']
  2. Create a Terra.describeViewports block.
  3. Set the constant as the viewports argument to this block.

Expected results

No violation reported.

Actual results

The viewports argument is marked as erroneous because it is not an array-type.

Technical notes

Versions affected

<= 0.4.1

Out of scope

picimako commented 3 years ago

Completed on release branch.