FOSSology  4.4.0
Open Source License Compliance by Open Source Software
compatibility.cc File Reference

Entry point for compatibility agent. More...

#include <stdexcept>
#include "compatibility.hpp"
Include dependency graph for compatibility.cc:

Go to the source code of this file.

Macros

#define return_sched(retval)
 

Functions

void check_file_compatibility (const string &lic_type_loc, const string &rule_loc, bool json, const string &lic_result_json, const string &main_license)
 Check and print license compatibility of scan result. More...
 
int main (int argc, char **argv)
 
vector< tuple< string, string, bool > > checkCompatibility (const set< string > &license_set, const unordered_map< string, string > &license_map, const map< tuple< string, string, string, string >, bool > &rule_list, map< tuple< string, string >, bool > &scan_results)
 find the compatibility for cli mode More...
 

Detailed Description

Entry point for compatibility agent.

Definition in file compatibility.cc.

Macro Definition Documentation

◆ return_sched

#define return_sched (   retval)
Value:
do \
{ \
fo_scheduler_disconnect((retval)); \
return (retval); \
} while (0)

Send disconnect to scheduler with retval and return function with retval.

Definition at line 53 of file compatibility.cc.

Function Documentation

◆ check_file_compatibility()

void check_file_compatibility ( const string &  lic_type_loc,
const string &  rule_loc,
bool  json,
const string &  lic_result_json,
const string &  main_license 
)

Check and print license compatibility of scan result.

Parameters
lic_type_locLocation of CSV holding license types
rule_locLocation of YAML holding rules
jsonIs JSON output required?
lic_result_jsonLocation of JSON holding scan results
main_licenseMain license for the package to use

Definition at line 68 of file compatibility.cc.

◆ checkCompatibility()

vector<tuple<string, string, bool> > checkCompatibility ( const set< string > &  license_set,
const unordered_map< string, string > &  license_map,
const map< tuple< string, string, string, string >, bool > &  rule_list,
map< tuple< string, string >, bool > &  scan_results 
)

find the compatibility for cli mode

Parameters
license_setcontaining licenses present in the file
license_mapmap of license name and its type
rule_listParsed map of YAML rule file
Returns
vector of tuple

Definition at line 216 of file compatibility.cc.