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] Bitbucket Cloud cannot comment entire file #1462

Open
alessandro308 opened this issue Aug 1, 2024 · 2 comments
Open

[BUG] Bitbucket Cloud cannot comment entire file #1462

alessandro308 opened this issue Aug 1, 2024 · 2 comments

Comments

@alessandro308
Copy link

alessandro308 commented Aug 1, 2024

Describe the bug
warn(message, fileName) adds the message into the mainComment rather than adding a file comment

Here an example of entire file comment:
image

This happens because a warning is matched with

export const isInline = (violation: Violation): boolean => violation.file !== undefined && violation.line !== undefined

but, in case of Bitbucket, the line is not mandatory.

I have no idea how to fix it because looks like that is a BB specific behaviour and at the inlineResults function we don't have context on the platform, right?

I'm happy to help to find and implement a fix if you can give me some hint...

I know that I may implement this with a custom API but in that case I'm going to lose all the check to update current comments, right?

@fbartho
Copy link
Member

fbartho commented Aug 1, 2024

The relevant files for you are probably here:

You can probably do something by passing 0 for the line-number so that violation.line !== undefined and then you can update the createInlineComment in either/both of the above files to do what you want to do.

@alessandro308
Copy link
Author

Ah, clever! I'll try it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants