Skip to content

Add new rule to catch syntax error e.g. "elif" instead of "elseif" #1299

Open
@agowa

Description

@agowa

Summary of the new feature

Try formulating it in user story style (if applicable):
'As a python and powershell developer I want ScriptAnalyzer to detect when I use elif (python) instead of elseif (powershell) so that the ci warns me about invalid statements and I can correct the code.'

Proposed technical implementation details (optional)

For powershell modules we need an additional ci check. Currently syntax errors are not always covered. The ci for example does currently not cover usage of elif instead of elseif (former is python later is powershell).

Example shippables: https://app.shippable.com/github/ansible/ansible/runs/133592/1/console (source)
It erroneously reports unused variables instead of a syntax error.

What is the latest version of PSScriptAnalyzer at the point of writing

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions