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

CSV output always returns at least two rows #829

Open
Tracked by #3043
pombredanne opened this issue Nov 1, 2017 · 4 comments
Open
Tracked by #3043

CSV output always returns at least two rows #829

pombredanne opened this issue Nov 1, 2017 · 4 comments

Comments

@pombredanne
Copy link
Member

One one should be returned. For instance scancode -l -f csv returns an empty row plus the licensing rows.

@yash-nisar
Copy link
Contributor

I'm working on this one ! @pombredanne

@yash-nisar
Copy link
Contributor

I've figured out the solution, notice the difference :
Initially :

./scancode -c -f csv something.txt
Scanning files for: copyrights with 1 process(es)...
Scanning files...
[####################] 1                       
Scanning done.
Scan statistics: 1 files scanned in 0s.
Scan options:    copyrights with 1 process(es).
Scanning speed:  1.58 files per sec.
Scanning time:   0s.
Indexing time:   0s.
Saving results.
Resource,scan_errors
/Trash_files/something.txt,

After the bug has been resolved :

./scancode -c -f csv /home/yash/Misc/Trash_files/something.txt
Scanning files for: copyrights with 1 process(es)...
Scanning files...
[####################] 1                       
Scanning done.
Scan statistics: 1 files scanned in 0s.
Scan options:    copyrights with 1 process(es).
Scanning speed:  1.2 files per sec.
Scanning time:   0s.
Indexing time:   0s.
Saving results.
Resource,scan_errors

Spoiler: Notice the last line in both cases.

yash-nisar added a commit to yash-nisar/scancode-toolkit that referenced this issue Jan 29, 2018
yash-nisar added a commit to yash-nisar/scancode-toolkit that referenced this issue Jan 30, 2018
yash-nisar added a commit to yash-nisar/scancode-toolkit that referenced this issue Jan 30, 2018
yash-nisar added a commit to yash-nisar/scancode-toolkit that referenced this issue Feb 4, 2018
@pombredanne
Copy link
Member Author

Thanks! this likely needs some rebasing on the latest develop

yash-nisar added a commit to yash-nisar/scancode-toolkit that referenced this issue Mar 3, 2018
yash-nisar added a commit to yash-nisar/scancode-toolkit that referenced this issue Mar 3, 2018
@pombredanne
Copy link
Member Author

I am not inclined to add this as a feature and make an exception for a special case: in the end storing tree in square tables is a hard problem. Instead I would rather have a separate feature that would flatten the CSV entirely as in #830

@pombredanne pombredanne added this to the v3.2 milestone Feb 18, 2019
@pombredanne pombredanne removed this from the v3.3 milestone Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants