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    InvalidParamClosureThisTag,
13    InvalidParamTag,
14    InvalidThrowsTag,
15    InvalidPropertyTag,
16    InvalidAssertionTag,
17    InvalidVarTag,
18    InvalidTemplateTag,
19    InvalidTypeTag,
20    InvalidUseTag,
21    InvalidExtendsTag,
22    InvalidImplementsTag,
23    InvalidRequireExtendsTag,
24    InvalidRequireImplementsTag,
25    InvalidInheritorsTag,
26    InvalidMixinTag,
27    CircularTypeImport,
28    PatchDuplicateTarget,
29    PatchKindMismatch,
30    PatchReadonlyMismatch,
31    PatchHierarchyMismatch,
32    PatchDeclaresTrait,
33    PatchIntroducesNewSymbol,
34    PatchIntroducesNewMethod,
35    PatchIntroducesNewProperty,
36    PatchIntroducesNewConstant,
37    PatchEnumCasesIgnored,
38    PatchPropertyStructuralMismatch,
39    PatchConstantStructuralMismatch,
40    PatchMethodStructuralMismatch,
41    PatchFunctionParameterMismatch,
42    PatchFunctionParameterNameMismatch,
43}
44
45impl From<ScanningIssueKind> for String {
46    fn from(val: ScanningIssueKind) -> Self {
47        val.to_string()
48    }
49}