# fuchsia_licenses_classification

Produces a json file with license classification output.

The \[name\].json has the following schema:

    {
        // Dictionary of license_ids : lists of classifications
        "[license_id]":
            [
                // list of named classifications
                {
                    "name": str,
                    "confidence": float,
                    "start_line": int,
                    "end_line": int,
                },
                ...
            ],
        ,
        ...
    }

## **ATTRIBUTES**

| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this target. | [Name](https://bazel.build/concepts/labels#target-names) | required | - |
| spdx_input | The target to aggregate the licenses from. | [Label](https://bazel.build/rules/lib/toplevel/attr#label) | required | - |
| identify_license | The location of the 'identify_license' tool from https://github.com/google/licenseclassifier/tree/main/tools/identify_license or a program with a similar I/O. Different organizations should configure and build identify_license to match their organization OSS compliance policies. | [Label](https://bazel.build/rules/lib/toplevel/attr#label) | required | - |
| policy_override_rules | Condition override rule files | [Label List](https://bazel.build/rules/lib/toplevel/attr#label_list) | optional | `[]` |
| default_condition | Deprecated | [String](https://bazel.build/rules/lib/toplevel/attr#string) | optional | `""` |
| default_is_project_shipped | Whether by default OSS projects are shipped | [Boolean](https://bazel.build/rules/lib/toplevel/attr#bool) | optional | `True` |
| default_is_notice_shipped | Whether by default OSS notices are shipped | [Boolean](https://bazel.build/rules/lib/toplevel/attr#bool) | optional | `True` |
| default_is_source_code_shipped | Whether by default OSS source code is shipped | [Boolean](https://bazel.build/rules/lib/toplevel/attr#bool) | optional | `False` |
| allowed_conditions | List of allowed conditions. | [String List](https://bazel.build/rules/lib/toplevel/attr#string_list) | optional | `[]` |
| conditions_requiring_shipped_notice | Only licenses with the any of the given condition will be shipped as notices. | [String List](https://bazel.build/rules/lib/toplevel/attr#string_list) | optional | `[]` |
| fail_on_disallowed_conditions | The rule will fail if identified licenses map to disallowed conditions. | [Boolean](https://bazel.build/rules/lib/toplevel/attr#bool) | optional | `True` |
| failure_message_preamble | A text file that contains a failure message preamble. The message will be pre-pended to the standard generated failure message, allowing downstream customers to provide project specific instructions, such as documentation or persons of contact. | [Label](https://bazel.build/rules/lib/toplevel/attr#label) | optional | `None` |