Skip to content

Commit 868fa79

Browse files
committed
移除一些不必要的 DiagnosticCode
1 parent bc6a5c2 commit 868fa79

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

crates/emmylua_code_analysis/src/diagnostic/lua_diagnostic_code.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ pub enum DiagnosticCode {
2222
MissingParameter,
2323
/// Redundant parameter
2424
RedundantParameter,
25-
/// Inject field fail
26-
InjectFieldFail,
2725
/// Unreachable code
2826
UnreachableCode,
2927
/// Unused
@@ -36,8 +34,6 @@ pub enum DiagnosticCode {
3634
AccessInvisible,
3735
/// Discard return value
3836
DiscardReturns,
39-
/// Disable global define
40-
DisableGlobalDefine,
4137
/// Undefined field
4238
UndefinedField,
4339
/// Local const reassign
@@ -50,8 +46,6 @@ pub enum DiagnosticCode {
5046
RedefinedLocal,
5147
/// Redefined label
5248
RedefinedLabel,
53-
/// Name Style check
54-
NameStyleCheck,
5549
/// Code style check
5650
CodeStyleCheck,
5751
/// Need check nil
@@ -112,14 +106,12 @@ pub fn get_default_severity(code: DiagnosticCode) -> DiagnosticSeverity {
112106
DiagnosticCode::MissingReturn => DiagnosticSeverity::WARNING,
113107
DiagnosticCode::ParamTypeNotMatch => DiagnosticSeverity::WARNING,
114108
DiagnosticCode::MissingParameter => DiagnosticSeverity::WARNING,
115-
DiagnosticCode::InjectFieldFail => DiagnosticSeverity::ERROR,
116109
DiagnosticCode::UnreachableCode => DiagnosticSeverity::HINT,
117110
DiagnosticCode::Unused => DiagnosticSeverity::HINT,
118111
DiagnosticCode::UndefinedGlobal => DiagnosticSeverity::ERROR,
119112
DiagnosticCode::Deprecated => DiagnosticSeverity::HINT,
120113
DiagnosticCode::AccessInvisible => DiagnosticSeverity::WARNING,
121114
DiagnosticCode::DiscardReturns => DiagnosticSeverity::WARNING,
122-
DiagnosticCode::DisableGlobalDefine => DiagnosticSeverity::ERROR,
123115
DiagnosticCode::UndefinedField => DiagnosticSeverity::WARNING,
124116
DiagnosticCode::LocalConstReassign => DiagnosticSeverity::ERROR,
125117
DiagnosticCode::DuplicateType => DiagnosticSeverity::WARNING,
@@ -132,9 +124,6 @@ pub fn get_default_severity(code: DiagnosticCode) -> DiagnosticSeverity {
132124

133125
pub fn is_code_default_enable(code: &DiagnosticCode) -> bool {
134126
match code {
135-
DiagnosticCode::InjectFieldFail => false,
136-
DiagnosticCode::DisableGlobalDefine => false,
137-
// DiagnosticCode::UndefinedField => false,
138127
DiagnosticCode::IterVariableReassign => false,
139128
DiagnosticCode::CodeStyleCheck => false,
140129
DiagnosticCode::IncompleteSignatureDoc => false,

0 commit comments

Comments
 (0)