Skip to content

v0.84.0

Compare
Choose a tag to compare
@github-actions github-actions released this 08 Aug 00:35
· 455 commits to main since this release
v0.84.0
23ec89e

Bug Fixes

  • debugger: Corrected handling of local variables in variables inspector (12ecdd4)

  • debugger: Corrected start debuggin in internalConsole (f3fbf20)

  • robot: Use casefold for normalizing and remove some local imports in VariableMatcher (04e12a7)

  • vscode: Remove attachPython from default launch.json config (8052f8d)

  • vscode: Only test cases are reported as queued, started and completed (f68b8e3)

    this corrects the number of successful/executed test cases in the upper area of the test explorer

Features

  • debugger: Added support for disabling the hiding of debugger threads/tasks. (049c905)

    By setting the ROBOTCODE_DISABLE_HIDDEN_TASKS environment variable to a value not equal to 0, the Robot Code debugger will not be hidden from the Debugpy debugger, allowing you to debug the Robot Code debugger itself.

  • Diagnostics modifiers (223ec13)

    Implement functionality to configure diagnostic error messages during source code analysis. Lines in the code with the # robotcode: marker are now interpreted as modifiers. The full structure of a modifier is # robotcode: <action>[code(,code)*]*.

    Allowed actions:

    • ignore: Ignore specified diagnostic codes.
    • hint: Treat specified diagnostic codes as hints.
    • warn: Treat specified diagnostic codes as warnings.
    • error: Treat specified diagnostic codes as errors.
    • reset: Reset the diagnostic codes to their default state.

    This implementation allows for the following:

    • Custom actions to be performed on specified diagnostic codes.
    • Enhanced control over which diagnostic messages are shown, ignored, or modified.
    • Flexibility in managing diagnostic outputs for better code quality and debugging experience.

    Usage details:

    • A diagnostic modifier can be placed at the end of a line. It modifies only the errors occurring in that line.
    • A modifier can be placed at the very beginning of a line. It applies from that line to the end of the file.
    • If a modifier is within a block (e.g., Testcase, Keyword, IF, FOR) and is indented, it applies only to the current block.

    Example usage:

    • # robotcode: ignore[variable-not-found, keyword-not-found] - Ignores the errors for variable not found and keyword not found.
    • # robotcode: hint[MultipleKeywords] - Treats the MultipleKeywords error as a hint.
    • # robotcode: warn[variable-not-found] - Treats the variable-not-found error as a warning.
    • # robotcode: error[keyword-not-found] - Treats the keyword-not-found error as an error.
    • # robotcode: reset[MultipleKeywords] - Resets the MultipleKeywords error to its default state.
    • # robotcode: ignore - Ignores all diagnostic messages .
    • # robotcode: reset - Resets all diagnostic messages to their default.

    Example scenarios:

    Modifier at the end of a line:

    *** Keywords ***
    Keyword Name
        Log    ${arg1}    # robotcode: ignore[variable-not-found]

    This modifier will ignore the variable-not-found error for the Log keyword in this line only.

    Modifier at the beginning of a line:

    # robotcode: ignore[keyword-not-found]
    *** Test Cases ***
    Example Test
        Log    Hello
        Some Undefined Keyword

    This modifier will ignore keyword-not-found errors from the point it is declared to the end of the file.

    Modifier within a block:

    *** Keywords ***
    Example Keyword
        # robotcode: warn[variable-not-found]
        Log    ${arg1}
        Another Keyword

    This modifier will treat variable-not-found errors as warnings within the Example Keyword block.

    Modifier using reset:

    # robotcode: error[variable-not-found]
    *** Test Cases ***
    Example Test
        Log    ${undefined_variable}
        # robotcode: reset[variable-not-found]
        Log    ${undefined_variable}

    In this example, the variable-not-found error is treated as an error until it is reset in the Another Test block, where it will return to its default state.

    Modifier to ignore all diagnostic messages:

    # robotcode: ignore
    *** Test Cases ***
    Example Test
        Log    ${undefined_variable}
        Some Undefined Keyword

    This modifier will ignore all diagnostic messages from the point it is declared to the end of the file.

    Modifier to reset all diagnostic messages:

    # robotcode: ignore
    *** Test Cases ***
    Example Test
        Log    ${undefined_variable}
        # robotcode: reset
        Another Test
            Some Undefined Keyword

    In this example, all diagnostic messages are ignored until the reset modifier, which returns all messages to their default state from that point onward.