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

[Question] Can you scan arbitrary files for licenses in code comments? #35

Open
mjz48 opened this issue Nov 14, 2023 · 0 comments
Open

Comments

@mjz48
Copy link

mjz48 commented Nov 14, 2023

Hello, I've been experimenting with the v4.3.0 release to scan files in my C++ repository for licenses. I've found many in the readme or license files, but sometimes there are licenses in "header-only" libraries that are at the top of the header file in comments, like so:

#ifndef DATE_H
#define DATE_H

// The MIT License (MIT)
//
// Copyright (c) 2015, 2016, 2017 Howard Hinnant
// Copyright (c) 2016 Adrian Colomitchi
// Copyright (c) 2017 Florian Dang
// Copyright (c) 2017 Paul Thompson
// Copyright (c) 2018, 2019 Tomasz Kamiński
// Copyright (c) 2019 Jiangang Zhuang
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.

Since this is in a file ...external/date/date.h in a separate subdirectory from the README, it doesn't show up in the results.

Is there anything I can do to detect these?

EDIT: I noticed there was one pull request to expose an interface for scanning arbitrary files, but that's a go interface. Is there anything that's already existing for someone using the precompiled executable from a bash script, for instance?

Thanks!

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

No branches or pull requests

1 participant