Skip to content

[BUG] amber check should check pub functions even if they are not calledΒ #807

@lens0021

Description

@lens0021

To Reproduce

git switch --detach 3d0b2a2aa5c72606850a5d00159097067ce36c68` # a commit on `staging`
cargo run -- check src/std/env.ab

Expected behavior

 WARN  Invalid escape sequence '\x'
at src/std/env.ab:84:43

83| pub fun input_confirm(prompt: Text, default_yes: Bool = false): Bool {
84|     let choice_default = default_yes then " [\x1b[1mY/\x1b[0mn]" else " [y/\x1b[1mN\x1b[0m]"
85|     trust {
Only these escape sequences are supported: \n, \t, \r, \0, \{, \$, \', \", \\
 WARN  Invalid escape sequence '\x'
at src/std/env.ab:84:43

...

Actual behavior
Nothing printed with exit code 0.

Additional context
I have a plan to add a GitHub Actions workflow that executes amber check for all amber files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions