Skip to content

fix(binder): Use minimum of startLine and endLine#63

Merged
Kaushl2208 merged 1 commit intofossology:masterfrom
rajuljha:fix/62
Jul 23, 2025
Merged

fix(binder): Use minimum of startLine and endLine#63
Kaushl2208 merged 1 commit intofossology:masterfrom
rajuljha:fix/62

Conversation

@rajuljha
Copy link
Contributor

@rajuljha rajuljha commented Jul 5, 2025

Check valid pairs of startLine and endLine comments before indexing as a list.

Fixes #62

Screenshot of the fix:
Screenshot 2025-07-06 at 1 21 41 AM

@Kaushl2208
Copy link
Member

Hey @rajuljha , Just a quick question with the example you pasted: here in total_lines_of_comments the value showed is -2644 any reason for that?
Pasting screenshot:
image

@rajuljha
Copy link
Contributor Author

rajuljha commented Jul 6, 2025

Oh, I see the problem now, the reason the endLine and startLine length's dont match is because of this:
Screenshot 2025-07-06 at 2 21 34 PM

It is treating the "*/" symbol in the code as a end of a comment.

We haven't handled this in code yet. I'll fix this.

… endLine

Fixes fossology#62

Signed-off-by: Rajul Jha <rajuljha49@gmail.com>
@rajuljha
Copy link
Contributor Author

rajuljha commented Jul 6, 2025

Screenshot 2025-07-06 at 2 55 29 PM

Fixed it! Thanks for spotting that @Kaushl2208 :)

Copy link
Member

@Kaushl2208 Kaushl2208 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool man, Changes looks good now :)
Thanks for handling this in much better way.
Will give it a test. :)

@Kaushl2208
Copy link
Member

Tested, Working as expected!! Thanks @rajuljha for the fix :)

@Kaushl2208 Kaushl2208 merged commit 3687b62 into fossology:master Jul 23, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IndexError: list index out of range in binder.py in readMultiLineDiff method.

4 participants