provenant/parsers/metadata.rs
1// SPDX-FileCopyrightText: Provenant contributors
2// SPDX-License-Identifier: Apache-2.0
3
4/// Registered detection-surface metadata for auto-generating documentation.
5///
6/// This module provides the `ParserMetadata` type used by parser `metadata()`
7/// trait methods and by `bin/generate_supported_formats.rs` to automatically
8/// generate `docs/SUPPORTED_FORMATS.md`.
9///
10/// Fields are used by the xtask but not in library code,
11/// so we allow dead_code warnings for library builds.
12#[derive(Debug, Clone)]
13#[allow(dead_code)]
14pub struct ParserMetadata {
15 /// Human-readable description (e.g., "npm package.json manifest")
16 pub description: &'static str,
17 /// File patterns this parser matches (e.g., ["**/package.json"])
18 pub file_patterns: &'static [&'static str],
19 /// Package type identifier (e.g., "npm", "pypi", "maven")
20 pub package_type: &'static str,
21 /// Primary programming language (e.g., "JavaScript", "Python")
22 pub primary_language: &'static str,
23 /// Optional documentation URL
24 pub documentation_url: Option<&'static str>,
25}