1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-08 23:07:06 +02:00

chore(mobile): lint (#16182)

* lint - convert path to lowercase for finding index

* update dcm lint rules

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong
2025-02-18 21:04:19 +05:30
committed by GitHub
parent f1b98d5f45
commit 70d08a2b2a
2 changed files with 59 additions and 28 deletions

View File

@ -1,5 +1,5 @@
import 'package:analyzer/error/listener.dart';
import 'package:analyzer/error/error.dart' show ErrorSeverity;
import 'package:analyzer/error/listener.dart';
import 'package:custom_lint_builder/custom_lint_builder.dart';
// ignore: depend_on_referenced_packages
import 'package:glob/glob.dart';
@ -65,7 +65,8 @@ class ImportRule extends DartLintRule {
) {
if (_rootOffset == -1) {
const project = "/immich/mobile/";
_rootOffset = resolver.path.indexOf(project) + project.length;
_rootOffset =
resolver.path.toLowerCase().indexOf(project) + project.length;
}
final path = resolver.path.substring(_rootOffset);