Skip to main content

mago_codex/
issue.rs

1use serde::Deserialize;
2use serde::Serialize;
3use strum::Display;
4use strum::EnumString;
5
6#[derive(Clone, Copy, PartialEq, Eq, Hash, Display, Debug, PartialOrd, Ord, Serialize, Deserialize, EnumString)]
7#[strum(serialize_all = "kebab-case")]
8pub(crate) enum ScanningIssueKind {
9    MalformedDocblockComment,
10    InvalidReturnTag,
11    InvalidWhereTag,
12    InvalidParamOutTag,
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}