Skip to main content

pedant_types/
language.rs

1use serde::{Deserialize, Serialize};
2
3/// Programming language of a source file that produced a capability finding.
4#[derive(Serialize, Deserialize, Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
5#[serde(rename_all = "snake_case")]
6pub enum Language {
7    /// Python (`.py`).
8    Python,
9    /// JavaScript (`.js`, `.jsx`, `.mjs`, `.cjs`).
10    JavaScript,
11    /// TypeScript (`.ts`, `.tsx`, `.mts`, `.cts`).
12    TypeScript,
13    /// Go (`.go`).
14    Go,
15    /// Bash/shell (`.sh`, `.bash`, `.zsh`).
16    Bash,
17}