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

[#2209] Skip blank lines in blurb file url #2239

Merged
merged 7 commits into from
Aug 5, 2024

Conversation

jedkohjk
Copy link
Contributor

Resolves #2209

Proposed commit message

Ignore blank lines after delimiter in blurbs file

Uses a loop to skip blank lines when searching for the relevant url.

Copy link
Member

@ckcherry23 ckcherry23 left a comment

Choose a reason for hiding this comment

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

Thanks for working on this @jedkohjk! Could you update the unit and system tests to include test cases for this scenario?

Comment on lines 129 to 134
for (url = ""; url.length() == 0; url = lines.get(position++).strip()) {
// checks if delimiter is the last non-blank line
if (position >= lines.size()) {
return null;
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Nit: This works well enough, but we can consider using a while loop, as the linear flow would make it easier to read.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to use a while loop

@jedkohjk
Copy link
Contributor Author

Thanks for working on this @jedkohjk! Could you update the unit and system tests to include test cases for this scenario?

Modified blurbs files in test resources to account for this scenario

Copy link
Member

@ckcherry23 ckcherry23 left a comment

Choose a reason for hiding this comment

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

LGTM! Great work!

@ckcherry23 ckcherry23 requested review from a team July 26, 2024 15:52
@ckcherry23
Copy link
Member

@jedkohjk Can you update all your PR titles to include the issue number as per the expected format?

@jedkohjk jedkohjk changed the title Skip blank lines in blurb file url [#2209] Skip blank lines in blurb file url Aug 3, 2024
@jedkohjk
Copy link
Contributor Author

jedkohjk commented Aug 3, 2024

@jedkohjk Can you update all your PR titles to include the issue number as per the expected format?

Updated. Sorry, didn't notice the format previously.

Copy link
Contributor

@gok99 gok99 left a comment

Choose a reason for hiding this comment

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

LGTM

@gok99 gok99 added s.ToMerge and removed s.ToReview labels Aug 4, 2024
@ckcherry23 ckcherry23 merged commit 3b54a9c into reposense:master Aug 5, 2024
8 checks passed
Copy link
Contributor

github-actions bot commented Aug 5, 2024

The following links are for previewing this pull request:

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.

blurbs.md: Allow blank lines before repo/branch
3 participants