Project

General

Profile

Actions

Bug #23341

closed

Rudderc transform some method parameter name in an incorrect manner

Added by Félix DALLIDET 11 months ago. Updated 10 months ago.

Status:
Released
Priority:
N/A
Category:
rudderc
Target version:
Severity:
Critical - prevents main use of Rudder | no workaround | data loss | security
UX impact:
I hate Rudder for that
User visibility:
First impressions of Rudder
Effort required:
Very Small
Priority:
200
Name check:
To do
Fix check:
To do
Regression:
No

Description

A good example is "Report-If-Condition", its parameter name is generated by rudderc as "Report-Message" in the powershell file, when the cf bundle does define "report_Message".
I think that rudderc uses the function formatting to translates parameter names. It does work for single word param names.

    if ($localContext.Evaluate($class)) {
        $methodParams = @{
            Condition = "false" 
            Report-Message = "TODO" 

        }
        $call = Report-If-Condition @methodParams -PolicyMode $policyMode
        $methodContext = Compute-Method-Call @reportParams -MethodCall $call
        $localContext.merge($methodContext)

Report-Message is here interpreted as a function call by Powershell, it should instead be ReportMessage.

Actions

Also available in: Atom PDF