Skip to content

Fix bug in filter-clues plugin - #2353

Merged
AyanSinhaMahapatra merged 1 commit into
aboutcode-org:developfrom
tushar912:issue-1758
Jan 29, 2021
Merged

Fix bug in filter-clues plugin#2353
AyanSinhaMahapatra merged 1 commit into
aboutcode-org:developfrom
tushar912:issue-1758

Conversation

@tushar912

Copy link
Copy Markdown
Contributor

Fixes #1758

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled 📑 and links the original issue above 🔗
  • Tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR
    Run tests locally to check for errors.
  • Commits are in uniquely-named feature branch and has no merge conflicts 📁

Comment thread tests/scancode/test_cli.py Outdated


@pytest.mark.xfail(reason='Bug is not fixed yet')

@AyanSinhaMahapatra AyanSinhaMahapatra Dec 22, 2020

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A nitpick, keep only one new line between methods and two new lines between functions and classes.

@AyanSinhaMahapatra

Copy link
Copy Markdown
Member

@tushar912 Does ./scancode -clpieu --json-pp sample_filter_clues.json samples --filter-clues run properly now? Could you post the output JSON here?

The 2 failing tests seem to be from other problems that are fixed in the release branch.

@AyanSinhaMahapatra

Copy link
Copy Markdown
Member

Also, could you change the commit message according to this doc - https://aboutcode.readthedocs.io/en/latest/contributing/writing_good_commit_messages.html

So,

  1. Add more context about what is changed in the commit body,
  2. change fixes to fix in both PR name and commit header. https://chris.beams.io/posts/git-commit/#imperative
    etc.

@tushar912 tushar912 changed the title Fixed bug in filter-clues plugin Fix bug in filter-clues plugin Dec 22, 2020
@tushar912
tushar912 force-pushed the issue-1758 branch 2 times, most recently from 10d3a63 to 0f2765f Compare December 22, 2020 13:53
@tushar912

tushar912 commented Dec 22, 2020

Copy link
Copy Markdown
Contributor Author

@AyanSinhaMahapatra I think it is working I am getting this json output

filter_clues_bugfix_sample.json.txt

@pombredanne

Copy link
Copy Markdown
Member

@tushar912 @AyanSinhaMahapatra what's left to do here? I would like to merge this ASAP :)

@AyanSinhaMahapatra AyanSinhaMahapatra left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@pombredanne I've tested this branch locally, the bug isn't there anymore, the test reproducing the earlier bug passes (the test fails are from other problems fixed in the release branch), and the plugin seems to be doing everything as it should, i.e. removing redundant duplicated clues already contained in detected license and copyright texts and notices. It seems ready to merge to me, but you should still check the changes to see everything is in place.

But the commit message has to be changed as it seems to have leftovers from squashing two commits together, having two bodies, and two signoffs. @tushar912

@tushar912

Copy link
Copy Markdown
Contributor Author

@AyanSinhaMahapatra I have changed the commit message .I think it looks better now.

@AyanSinhaMahapatra

Copy link
Copy Markdown
Member

Another nitpick, adding the issue number on the commit header/body would be best. Just add #1758 after bug in the header and that would be all. Sorry I missed this before. Thanks++

fixed bug by using hasattr check on the resource object
and returning empty ignorables if not detections.licenses

Signed-off-by: Tushar912 <tushar.912u@gmail.com>
@tushar912

Copy link
Copy Markdown
Contributor Author

@AyanSinhaMahapatra I have made the change.

@pombredanne pombredanne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! Thank you++

@AyanSinhaMahapatra
AyanSinhaMahapatra merged commit 7d027f3 into aboutcode-org:develop Jan 29, 2021
@pombredanne

Copy link
Copy Markdown
Member

@AyanSinhaMahapatra please go ahead and merge

@pombredanne

Copy link
Copy Markdown
Member

@tushar912 Thank you ++ 🙇

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error in filter-clues Plugin

3 participants