luaur_analysis/methods/
lint_duplicate_function_report.rs1use crate::records::lint_duplicate_function::LintDuplicateFunction;
2use luaur_ast::records::location::Location;
3use luaur_config::enums::code::Code;
4
5impl LintDuplicateFunction {
6 pub fn report_location_c_char_location(
7 &mut self,
8 name: &str,
9 location: Location,
10 other_location: Location,
11 ) {
12 crate::functions::emit_warning::emit_warning(
13 unsafe { &mut *self.context },
14 Code::Code_DuplicateFunction,
15 location,
16 format_args!(
17 "Duplicate function definition: '{}' also defined on line {}",
18 name,
19 other_location.begin.line + 1
20 ),
21 );
22 }
23}