Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Help URL for custom rules links to Robocop docs #1123

Open
Lakitna opened this issue Oct 17, 2024 · 3 comments · May be fixed by #1138
Open

[Bug] Help URL for custom rules links to Robocop docs #1123

Lakitna opened this issue Oct 17, 2024 · 3 comments · May be fixed by #1138
Labels
bug Something isn't working

Comments

@Lakitna
Copy link
Contributor

Lakitna commented Oct 17, 2024

What happened?

I use a bunch of custom lint rules. When generating a Sarif report, the value of helpUri always refers to the RoboCop docs. Even for custom lint rules.

Example:

Note the contents of the helpUri field.

{
    "id": "CUSTOM-01",
    "name": "my-custom-lint-rule",
    "helpUri": "https://robocop.readthedocs.io/en/5.4.0/rules_list.html#my-custom-lint-rule",
    "shortDescription": {
        "text": "My amazing description"
    },
    "fullDescription": {
        "text": ""
    },
    "defaultConfiguration": {
        "level": "warning"
    },
    "help": {
        "text": "",
        "markdown": ""
    }
},

What command/code did you try to run?

robocop . --reports sarif

What is the full error message?

None

What did you expect to happen instead?

I expect one of:

  • Custom lint rules don't populate the helpUri field
  • I can control the contents of the helpUri field manually

The first solution might be simpler to implement and would reduce confusion. The second solution is preferable since we have custom lint rule docs I'd like to reference.

Operating System

Windows

Robocop version

5.4.0

@Lakitna Lakitna added the bug Something isn't working label Oct 17, 2024
@bhirsz
Copy link
Member

bhirsz commented Oct 17, 2024

I also prefer second option. This could be attribute in Rule class

@Lakitna
Copy link
Contributor Author

Lakitna commented Oct 17, 2024

That'd be perfect. Do you have ideas for handling the default and community rules?

@Lakitna Lakitna linked a pull request Nov 2, 2024 that will close this issue
@Lakitna
Copy link
Contributor Author

Lakitna commented Nov 2, 2024

I made a small proof of concept in #1138

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants