SonarJS linter helper functions
    Preparing search index...

    Function AwsCdkCheckArguments

    • Function to analyse arguments in a function and check for correct values. It will report if the conditions are not met unless silent = true, in which case it will return boolean true indicating conditions are not met.

      Parameters

      • messageId: string | string[]

        Array of messageIds or single string if only one messageId is used. When an array is passed, first messageId is used for omitted values and second for invalid values.

      • needsProps: boolean

        whether default (undefined) values are allowed or if it must be set

      • propertyName: string | string[]

        property name to search in the object (Array of strings for nested props)

      • Optionalvalues: ValuesByType

        allowed or disallowed values

      • silent: boolean = false

        whether the function must report or just return conflicting Node when conditions are not met

      • position: number = AWS_OPTIONS_ARGUMENT_POSITION

        position of the argument to be analysed (3rd argument by default)

      Returns (expr: NewExpression, ctx: RuleContext) => undefined | Node