use super::OutputFieldDoc;
pub(super) const FILE_INFO_FIELDS: &[OutputFieldDoc] = &[
OutputFieldDoc {
json_name: "path",
rust_field: "path",
value_shape: "string",
presence: "Always emitted.",
meaning: "Scan-root-relative path for the file or directory record.",
},
OutputFieldDoc {
json_name: "type",
rust_field: "file_type",
value_shape: "string",
presence: "Always emitted.",
meaning: "File-vs-directory type discriminator on the public output surface.",
},
OutputFieldDoc {
json_name: "name",
rust_field: "name",
value_shape: "string",
presence: "Always emitted.",
meaning: "Basename of the file or directory record.",
},
OutputFieldDoc {
json_name: "base_name",
rust_field: "base_name",
value_shape: "string",
presence: "Always emitted.",
meaning: "Basename without extension.",
},
OutputFieldDoc {
json_name: "extension",
rust_field: "extension",
value_shape: "string",
presence: "Always emitted.",
meaning: "Filename extension including the leading dot when one exists.",
},
OutputFieldDoc {
json_name: "size",
rust_field: "size",
value_shape: "integer",
presence: "Always emitted.",
meaning: "File size in bytes for files, or zero for synthetic/default directory rows.",
},
OutputFieldDoc {
json_name: "date",
rust_field: "date",
value_shape: "string | null",
presence: "Emitted only on the file-info surface.",
meaning: "File date metadata on the opt-in file-info surface.",
},
OutputFieldDoc {
json_name: "sha1",
rust_field: "sha1",
value_shape: "string | null",
presence: "Emitted only on the file-info surface.",
meaning: "SHA-1 checksum on the opt-in file-info surface.",
},
OutputFieldDoc {
json_name: "md5",
rust_field: "md5",
value_shape: "string | null",
presence: "Emitted only on the file-info surface.",
meaning: "MD5 checksum on the opt-in file-info surface.",
},
OutputFieldDoc {
json_name: "sha256",
rust_field: "sha256",
value_shape: "string | null",
presence: "Emitted only on the file-info surface.",
meaning: "SHA-256 checksum on the opt-in file-info surface.",
},
OutputFieldDoc {
json_name: "sha1_git",
rust_field: "sha1_git",
value_shape: "string | null",
presence: "Emitted only on the file-info surface.",
meaning: "Git-style SHA-1 checksum on the opt-in file-info surface.",
},
OutputFieldDoc {
json_name: "mime_type",
rust_field: "mime_type",
value_shape: "string | null",
presence: "Emitted only on the file-info surface.",
meaning: "Detected MIME type on the opt-in file-info surface.",
},
OutputFieldDoc {
json_name: "file_type",
rust_field: "file_type_label",
value_shape: "string | null",
presence: "Emitted only on the file-info surface.",
meaning: "Additional file-type label on the opt-in file-info surface.",
},
OutputFieldDoc {
json_name: "programming_language",
rust_field: "programming_language",
value_shape: "string | null",
presence: "Emitted only on the file-info surface.",
meaning: "Language hint derived by file classification rather than package parsing.",
},
OutputFieldDoc {
json_name: "is_binary",
rust_field: "is_binary",
value_shape: "boolean | null",
presence: "Emitted only on the file-info surface.",
meaning: "Binary-file hint on the opt-in file-info surface.",
},
OutputFieldDoc {
json_name: "is_text",
rust_field: "is_text",
value_shape: "boolean | null",
presence: "Emitted only on the file-info surface.",
meaning: "Text-file hint on the opt-in file-info surface.",
},
OutputFieldDoc {
json_name: "is_archive",
rust_field: "is_archive",
value_shape: "boolean | null",
presence: "Emitted only on the file-info surface.",
meaning: "Archive-file hint on the opt-in file-info surface.",
},
OutputFieldDoc {
json_name: "is_media",
rust_field: "is_media",
value_shape: "boolean | null",
presence: "Emitted only on the file-info surface.",
meaning: "Media-file hint on the opt-in file-info surface.",
},
OutputFieldDoc {
json_name: "is_source",
rust_field: "is_source",
value_shape: "boolean | null",
presence: "Emitted only on the file-info surface.",
meaning: "Source-file hint on the opt-in file-info surface.",
},
OutputFieldDoc {
json_name: "is_script",
rust_field: "is_script",
value_shape: "boolean | null",
presence: "Emitted only on the file-info surface.",
meaning: "Script-file hint on the opt-in file-info surface.",
},
OutputFieldDoc {
json_name: "files_count",
rust_field: "files_count",
value_shape: "integer | null",
presence: "Emitted only on the file-info surface.",
meaning: "Nested file count on directory/info records when available.",
},
OutputFieldDoc {
json_name: "dirs_count",
rust_field: "dirs_count",
value_shape: "integer | null",
presence: "Emitted only on the file-info surface.",
meaning: "Nested directory count on directory/info records when available.",
},
OutputFieldDoc {
json_name: "size_count",
rust_field: "size_count",
value_shape: "integer | null",
presence: "Emitted only on the file-info surface.",
meaning: "Aggregated nested size count on directory/info records when available.",
},
OutputFieldDoc {
json_name: "package_data",
rust_field: "package_data",
value_shape: "array<object>",
presence: "Always emitted.",
meaning: "Raw parser-emitted package rows attached to this file record.",
},
OutputFieldDoc {
json_name: "detected_license_expression",
rust_field: "license_expression",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Primary file-level license expression in ScanCode license keys after grouping detections; the scancode-key counterpart of detected_license_expression_spdx.",
},
OutputFieldDoc {
json_name: "detected_license_expression_spdx",
rust_field: "license_expression",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Primary SPDX-oriented file-level license expression after grouping detections and applying strict combination rules.",
},
OutputFieldDoc {
json_name: "license_detections",
rust_field: "license_detections",
value_shape: "array<object>",
presence: "Always emitted.",
meaning: "Grouped license detections attached to this file record.",
},
OutputFieldDoc {
json_name: "license_clues",
rust_field: "license_clues",
value_shape: "array<object>",
presence: "Emitted only when non-empty.",
meaning: "Low-confidence or clue-only matches that are surfaced separately from concrete detections.",
},
OutputFieldDoc {
json_name: "percentage_of_license_text",
rust_field: "percentage_of_license_text",
value_shape: "number | null",
presence: "Emitted only when a percentage was computed.",
meaning: "Approximate proportion of the file that participated in license text matches.",
},
OutputFieldDoc {
json_name: "copyrights",
rust_field: "copyrights",
value_shape: "array<object>",
presence: "Always emitted.",
meaning: "File-level copyright evidence records.",
},
OutputFieldDoc {
json_name: "holders",
rust_field: "holders",
value_shape: "array<object>",
presence: "Always emitted.",
meaning: "File-level holder evidence records.",
},
OutputFieldDoc {
json_name: "authors",
rust_field: "authors",
value_shape: "array<object>",
presence: "Always emitted.",
meaning: "File-level author evidence records.",
},
OutputFieldDoc {
json_name: "emails",
rust_field: "emails",
value_shape: "array<object>",
presence: "Emitted only when non-empty.",
meaning: "File-level extracted email records.",
},
OutputFieldDoc {
json_name: "urls",
rust_field: "urls",
value_shape: "array<object>",
presence: "Always emitted.",
meaning: "File-level extracted URL records.",
},
OutputFieldDoc {
json_name: "for_packages",
rust_field: "for_packages",
value_shape: "array<string>",
presence: "Always emitted.",
meaning: "Package UIDs that this file record is attached to after assembly or file-reference resolution.",
},
OutputFieldDoc {
json_name: "scan_errors",
rust_field: "scan_errors",
value_shape: "array<string>",
presence: "Always emitted.",
meaning: "Per-file problems that did not prevent the overall scan from completing.",
},
OutputFieldDoc {
json_name: "license_policy",
rust_field: "license_policy",
value_shape: "array<object> | null",
presence: "Emitted only when policy output is available.",
meaning: "Policy decoration entries attached to the file’s license findings when policy evaluation ran.",
},
OutputFieldDoc {
json_name: "is_generated",
rust_field: "is_generated",
value_shape: "boolean | null",
presence: "Emitted only when generated-code classification ran.",
meaning: "Generated-code signal on the info/classification surface.",
},
OutputFieldDoc {
json_name: "source_count",
rust_field: "source_count",
value_shape: "integer | null",
presence: "Emitted only when source counts are available.",
meaning: "Count of nested source files on directory/info records when available.",
},
OutputFieldDoc {
json_name: "is_legal",
rust_field: "is_legal",
value_shape: "boolean",
presence: "Emitted only when true.",
meaning: "Marks a file treated as legal-material evidence for key-file and summary logic.",
},
OutputFieldDoc {
json_name: "is_manifest",
rust_field: "is_manifest",
value_shape: "boolean",
presence: "Emitted only when true.",
meaning: "Marks a file treated as a manifest-like key file for package or summary logic.",
},
OutputFieldDoc {
json_name: "is_readme",
rust_field: "is_readme",
value_shape: "boolean",
presence: "Emitted only when true.",
meaning: "Marks a file treated as README-style descriptive project metadata.",
},
OutputFieldDoc {
json_name: "is_top_level",
rust_field: "is_top_level",
value_shape: "boolean",
presence: "Emitted only when true.",
meaning: "Marks a file treated as top-level for summary or package-root reasoning, even if filesystem depth differs.",
},
OutputFieldDoc {
json_name: "is_key_file",
rust_field: "is_key_file",
value_shape: "boolean",
presence: "Emitted only when true.",
meaning: "Marks a file that participates directly in summary and license clarity scoring.",
},
OutputFieldDoc {
json_name: "is_referenced",
rust_field: "is_referenced",
value_shape: "boolean",
presence: "Emitted only when true.",
meaning: "Marks a file whose content was followed as referenced evidence from another scanned file or package record.",
},
OutputFieldDoc {
json_name: "is_community",
rust_field: "is_community",
value_shape: "boolean",
presence: "Emitted only when true.",
meaning: "Marks a file treated as community-material evidence on the classification surface.",
},
OutputFieldDoc {
json_name: "facets",
rust_field: "facets",
value_shape: "array<string>",
presence: "Emitted only when non-empty.",
meaning: "Facet labels attached by user-defined facet rules for tally grouping.",
},
OutputFieldDoc {
json_name: "tallies",
rust_field: "tallies",
value_shape: "object | null",
presence: "Emitted only when file-level tallies were requested.",
meaning: "Per-file or per-directory tally block emitted by detailed tally workflows.",
},
];