# redundant-forwarding-function

Discourage functions that only forward their parameters unchanged

A function whose complete body calls another callable with the same parameters adds a name without adding behavior.
Instead, you SHOULD use the underlying callable directly.

Exported aliases, overrides, decorated functions, and ambient declarations remain intentional boundaries.

- Category: style
- Level: warning
- Fix: none
- Scope: module

## Reported

```ds title="main.ds"
declare function parse(source: string): int32;

function parseValue(source: string): int32 {
    return parse(source);
}
```

## Accepted

```ds title="main.ds"
declare function parse(source: string): int32;

const parseValue = parse;
```

[language/linter/src/rules/style/redundant_forwarding_function.rs:6](https://github.com/destack-sh/destack/blob/main/language/linter/src/rules/style/redundant_forwarding_function.rs#L6)
