Skip to content

A command-line tool for scanning source code files for license information and check compliance

License

Notifications You must be signed in to change notification settings

swift-nav/nocuckoo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nocuckoo

(Pronounced noʊˈku:ku:)

nocuckoo

A command-line tool for scanning source code files to detect and extract license information. This tool helps developers and organizations maintain compliance by identifying licenses in their codebase.

The name is inspired by the cuckoo bird, a brood parasite that lays its eggs in other birds' nests. Similarly, developers want to avoid incorporating foreign work into their products unknowingly. The name also refers to avoiding being "cuckoo" (foolish) by monitoring third-party license usage across a codebase.

Features

  • Scan source code files for license information
  • Highly configurable file extensions and ignore patterns
  • Directly integratable into a CI solution
  • Whitelist support for accepted licenses
  • Support for multiple report output formats:
    • Standard output (stdout) for human-readable results
    • JSON output for programmatic processing
    • HTML output for web-based viewing and sharing

Design Goals

  • Performance focused (scans 10,000 files in < 30s)
  • High test coverage
  • Well documented

Installation

For just using the tool, install it via:

cargo install --git https://github.com/swift-nav/nocuckoo

In case you want to contribute to the project, follow these steps to clone the sources:

# Clone the repository
git clone https://github.com/yourusername/nocuckoo.git
cd nocuckoo

# Run the project
cargo run --release

License Database

This tool requires a license database to match licenses against. The database must be a directory consisting of JSON files in the SPDX format. Please download the database directly from SPDX.

Usage

Basic usage:

nocuckoo [OPTIONS] --licenses <LICENSES> <PATHS>...

Invoke nocuckoo --help for detailed information.

Output Formats

Stdio Output

Prints a report with overall statistics and a tabular per-file summary.

JSON Output

Outputs a JSON file with detailed report information for further processing.

HTML Output

Generates a formatted HTML report with the same information as the Stdio report.

License

See LICENSE

About

A command-line tool for scanning source code files for license information and check compliance

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages