mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-22 14:34:15 +08:00
Disable dart-code-metrics for now
Even though I'm not using v4.2, the return-value rule is still being applied with `flutter analyze` though not consistently. For now, lets disable this, as there are 300+ warnings to fix.
This commit is contained in:
@ -17,8 +17,8 @@ analyzer:
|
||||
- "lib/generated_plugin_registrant.dart"
|
||||
enable-experiment:
|
||||
- nonfunction-type-aliases
|
||||
plugins:
|
||||
- dart_code_metrics
|
||||
# plugins:
|
||||
# - dart_code_metrics
|
||||
|
||||
linter:
|
||||
rules:
|
||||
@ -149,4 +149,3 @@ dart_code_metrics:
|
||||
# - no-magic-number
|
||||
# - no-object-declaration
|
||||
# - prefer-conditional-expressions
|
||||
|
||||
|
@ -49,7 +49,7 @@ class Analytics {
|
||||
var pseudoId = pref.getString("pseudoId");
|
||||
if (pseudoId == null) {
|
||||
pseudoId = const Uuid().v4();
|
||||
pref.setString("pseudoId", pseudoId);
|
||||
var _ = pref.setString("pseudoId", pseudoId);
|
||||
}
|
||||
|
||||
var config = AnalyticsConfig("", pref);
|
||||
|
@ -26,6 +26,6 @@ class AnalyticsConfig extends ChangeNotifier with SettingsSharedPref {
|
||||
var def = AnalyticsConfig(id, pref);
|
||||
|
||||
await setBool("collectUsageStatistics", enabled, def.enabled);
|
||||
await pref.setString("appVersion", appVersion);
|
||||
var _ = await pref.setString("appVersion", appVersion);
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ Future<Result<void>> sendAnalytics(pb.AnalyticsMessage msg) async {
|
||||
msg,
|
||||
options: CallOptions(timeout: _timeout),
|
||||
);
|
||||
await call;
|
||||
var _ = await call;
|
||||
} on Exception catch (e, st) {
|
||||
await channel.shutdown();
|
||||
return Result.fail(e, st);
|
||||
|
@ -46,7 +46,10 @@ class AnalyticsStorage {
|
||||
builder.add(intData.buffer.asUint8List());
|
||||
builder.add(eventData);
|
||||
|
||||
await File(filePath).writeAsBytes(builder.toBytes(), mode: FileMode.append);
|
||||
var _ = await File(filePath).writeAsBytes(
|
||||
builder.toBytes(),
|
||||
mode: FileMode.append,
|
||||
);
|
||||
numEventsThisSession++;
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ void _isolateMain(SendPort toMainSender) {
|
||||
ReceivePort fromMainRec = ReceivePort();
|
||||
toMainSender.send(fromMainRec.sendPort);
|
||||
|
||||
fromMainRec.listen((data) async {
|
||||
var _ = fromMainRec.listen((data) async {
|
||||
assert(data is _LoadingMessage);
|
||||
var msg = data as _LoadingMessage;
|
||||
|
||||
|
@ -47,7 +47,7 @@ class EditorBottomBar extends StatelessWidget {
|
||||
var addIcon = IconButton(
|
||||
icon: const Icon(Icons.attach_file),
|
||||
onPressed: () {
|
||||
showModalBottomSheet(
|
||||
var _ = showModalBottomSheet(
|
||||
context: context,
|
||||
builder: (c) => AddBottomSheet(editor, editorState),
|
||||
elevation: 0,
|
||||
@ -58,7 +58,7 @@ class EditorBottomBar extends StatelessWidget {
|
||||
var menuIcon = IconButton(
|
||||
icon: const Icon(Icons.more_vert),
|
||||
onPressed: () {
|
||||
showModalBottomSheet(
|
||||
var _ = showModalBottomSheet(
|
||||
context: context,
|
||||
builder: (c) => BottomMenuSheet(
|
||||
editor: editor,
|
||||
|
@ -145,7 +145,8 @@ Future<void> captureSentryException(
|
||||
level: level,
|
||||
);
|
||||
|
||||
await Sentry.captureEvent(event, stackTrace: Trace.from(stackTrace).terse);
|
||||
var _ = await Sentry.captureEvent(event,
|
||||
stackTrace: Trace.from(stackTrace).terse);
|
||||
return;
|
||||
} catch (e) {
|
||||
print("Failed to report with Sentry: $e");
|
||||
|
@ -123,6 +123,7 @@ bool openNewNoteEditor(BuildContext context, String term) {
|
||||
),
|
||||
settings: const RouteSettings(name: '/newNote/'),
|
||||
);
|
||||
Navigator.of(context).push(route);
|
||||
|
||||
var _ = Navigator.of(context).push(route);
|
||||
return true;
|
||||
}
|
||||
|
@ -239,7 +239,7 @@ class _FolderViewState extends State<FolderView> {
|
||||
),
|
||||
settings: RouteSettings(name: '/newNote/$routeType'),
|
||||
);
|
||||
await Navigator.of(context).push(route);
|
||||
var _ = await Navigator.of(context).push(route);
|
||||
ScaffoldMessenger.of(context).removeCurrentSnackBar();
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ class PurchaseManager {
|
||||
Log.i("Pending Complete Purchase - ${purchaseDetails.productID}");
|
||||
|
||||
try {
|
||||
await InAppPurchaseConnection.instance
|
||||
var _ = await InAppPurchaseConnection.instance
|
||||
.completePurchase(purchaseDetails);
|
||||
} catch (e, stackTrace) {
|
||||
logException(e, stackTrace);
|
||||
|
Reference in New Issue
Block a user