Skip to main content

mago_codex/
issue.rs

1use strum::Display;
2use strum::EnumString;
3
4#[derive(Clone, Copy, PartialEq, Eq, Hash, Display, Debug, PartialOrd, Ord, EnumString)]
5#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6#[strum(serialize_all = "kebab-case")]
7pub(crate) enum ScanningIssueKind {
8    MalformedDocblockComment,
9    InvalidReturnTag,
10    InvalidWhereTag,
11    InvalidParamOutTag,
12    InvalidParamTag,
13    InvalidThrowsTag,
14    InvalidPropertyTag,
15    InvalidAssertionTag,
16    InvalidVarTag,
17    InvalidTemplateTag,
18    InvalidTypeTag,
19    InvalidUseTag,
20    InvalidExtendsTag,
21    InvalidImplementsTag,
22    InvalidRequireExtendsTag,
23    InvalidRequireImplementsTag,
24    InvalidInheritorsTag,
25    InvalidMixinTag,
26    CircularTypeImport,
27    PatchDuplicateTarget,
28    PatchKindMismatch,
29    PatchReadonlyMismatch,
30    PatchHierarchyMismatch,
31    PatchDeclaresTrait,
32    PatchIntroducesNewSymbol,
33    PatchIntroducesNewMethod,
34    PatchIntroducesNewProperty,
35    PatchIntroducesNewConstant,
36    PatchEnumCasesIgnored,
37    PatchPropertyStructuralMismatch,
38    PatchConstantStructuralMismatch,
39    PatchMethodStructuralMismatch,
40    PatchFunctionParameterMismatch,
41    PatchFunctionParameterNameMismatch,
42}
43
44impl From<ScanningIssueKind> for String {
45    fn from(val: ScanningIssueKind) -> Self {
46        val.to_string()
47    }
48}