Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feature request/suggestion: libdoc invocation sets special environment variable #4906

Closed
@suiluj

Description

@suiluj

Hello,

I am relatively new to robot framework and stumpled upon a problem while developing a rf library in vscode while using the robot framework lsp extension:

The lsp extension runs libdoc while linting/checking the code.

In my library code i check for custom environment variables on class object init. These variables are only set on real test exection but of course not while just developing the tests. This results in erros of the extension while developing.

The vscode extension runs libdoc.

As a workaround I suggest that the libdoc robot framework runs sets a special environment variable like

RUN_BY_ROBOT_FRAMEWORK_LIBDOC=TRUE

Then my code could first check this environment variable and could skip the rest of the init code to avoid robot framework lsp errors.

Does this solution make sense or is my approach wrong?

Here I described my problem in the lsp repo:

robocorp/robotframework-lsp#988

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions