Browse Source

Merge pull request #176 from provokateurin/update/linting

Update linting rules
pull/178/head
Kate 2 years ago committed by GitHub
parent
commit
75c6dc938f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/dynamite/lib/src/openapi_builder.dart
  2. 2
      packages/dynamite/pubspec.yaml
  3. 2
      packages/file_icons/pubspec.yaml
  4. 2
      packages/neon/analysis_options.yaml
  5. 4
      packages/neon/lib/main.dart
  6. 4
      packages/neon/lib/src/apps/files/dialogs/choose_folder.dart
  7. 2
      packages/neon/lib/src/apps/files/widgets/browser_view.dart
  8. 2
      packages/neon/lib/src/apps/news/dialogs/feed_update_error.dart
  9. 8
      packages/neon/lib/src/pages/home.dart
  10. 2
      packages/neon/lib/src/pages/login.dart
  11. 2
      packages/neon/lib/src/widgets/account_tile.dart
  12. 4
      packages/neon/pubspec.lock
  13. 2
      packages/neon/pubspec.yaml
  14. 2
      packages/nextcloud/pubspec.yaml
  15. 6
      packages/nextcloud/test/webdav.dart
  16. 2
      packages/nextcloud_push_proxy/pubspec.yaml
  17. 2
      packages/nextcloud_test/pubspec.yaml
  18. 2
      packages/settings/pubspec.yaml
  19. 2
      packages/sort_box/pubspec.yaml
  20. 2
      packages/spec_templates/pubspec.yaml

2
packages/dynamite/lib/src/openapi_builder.dart

@ -1327,7 +1327,7 @@ TypeResult resolveType(
(final b) {
final s = schema.ofs![results.indexOf(result)];
b
..name = fields[result.name]!
..name = fields[result.name]
..type = refer(_makeNullable(result.name, true))
..modifier = FieldModifier.final$
..docs.addAll([

2
packages/dynamite/pubspec.yaml

@ -17,4 +17,4 @@ dev_dependencies:
nit_picking:
git:
url: https://github.com/stack11/dart_nit_picking
ref: 9f625eb
ref: 0b2ee0d

2
packages/file_icons/pubspec.yaml

@ -14,7 +14,7 @@ dev_dependencies:
nit_picking:
git:
url: https://github.com/stack11/dart_nit_picking
ref: 9f625eb
ref: 0b2ee0d
flutter:
fonts:

2
packages/neon/analysis_options.yaml

@ -2,4 +2,4 @@ include: package:nit_picking/flutter.yaml
analyzer:
exclude:
- lib/src/l10n/**
- lib/l10n/**

4
packages/neon/lib/main.dart

@ -17,7 +17,9 @@ Future main() async {
}
env = Env.fromMap(dotenv.env);
}
} catch (e) {}
} catch (e) {
debugPrint('Failed to load env: $e');
}
WidgetsFlutterBinding.ensureInitialized();

4
packages/neon/lib/src/apps/files/dialogs/choose_folder.dart

@ -51,8 +51,8 @@ class FilesChooseFolderDialog extends StatelessWidget {
child: Text(AppLocalizations.of(context).filesCreateFolder),
),
ElevatedButton(
onPressed: !(const ListEquality().equals(originalPath, pathSnapshot.data!))
? () => Navigator.of(context).pop(pathSnapshot.data!)
onPressed: !(const ListEquality().equals(originalPath, pathSnapshot.data))
? () => Navigator.of(context).pop(pathSnapshot.data)
: null,
child: Text(AppLocalizations.of(context).filesChooseFolder),
),

2
packages/neon/lib/src/apps/files/widgets/browser_view.dart

@ -89,7 +89,7 @@ class _FilesBrowserViewState extends State<FilesBrowserView> {
hasPreview: null,
isFavorite: null,
),
uploadProgress: uploadTaskProgressSnapshot.data!,
uploadProgress: uploadTaskProgressSnapshot.data,
downloadProgress: null,
),
),

2
packages/neon/lib/src/apps/news/dialogs/feed_update_error.dart

@ -21,7 +21,7 @@ class _NewsFeedUpdateErrorDialogState extends State<NewsFeedUpdateErrorDialog> {
onPressed: () async {
await Clipboard.setData(
ClipboardData(
text: widget.feed.lastUpdateError!,
text: widget.feed.lastUpdateError,
),
);
if (mounted) {

8
packages/neon/lib/src/pages/home.dart

@ -53,13 +53,13 @@ class _HomePageState extends State<HomePage> {
bool? supported;
switch (id) {
case 'core':
supported = await widget.account.client.core.isSupported(result.data!);
supported = await widget.account.client.core.isSupported(result.data);
break;
case 'news':
supported = await widget.account.client.news.isSupported();
break;
case 'notes':
supported = await widget.account.client.notes.isSupported(result.data!);
supported = await widget.account.client.notes.isSupported(result.data);
break;
}
if (!(supported ?? true)) {
@ -460,7 +460,7 @@ class _HomePageState extends State<HomePage> {
if (accounts.length > 1) ...[
Text(
account.client.humanReadableID,
style: Theme.of(context).textTheme.bodySmall!,
style: Theme.of(context).textTheme.bodySmall,
),
],
],
@ -494,7 +494,7 @@ class _HomePageState extends State<HomePage> {
if (accounts.length > 1) ...[
Text(
account.client.humanReadableID,
style: Theme.of(context).textTheme.bodySmall!,
style: Theme.of(context).textTheme.bodySmall,
),
],
],

2
packages/neon/lib/src/pages/login.dart

@ -29,7 +29,7 @@ class _LoginPageState extends State<LoginPage> {
_loginBloc = LoginBloc(_packageInfo);
if (widget.serverURL != null) {
_loginBloc.setServerURL(widget.serverURL!);
_loginBloc.setServerURL(widget.serverURL);
}
_loginBloc.loginFlowInit.listen((final init) {

2
packages/neon/lib/src/widgets/account_tile.dart

@ -68,7 +68,7 @@ class AccountTile extends StatelessWidget {
width: 5,
),
ExceptionWidget(
userDetails.error!,
userDetails.error,
onlyIcon: true,
iconSize: 24,
onRetry: userDetailsBloc.refresh,

4
packages/neon/pubspec.lock

@ -565,8 +565,8 @@ packages:
dependency: "direct dev"
description:
path: "."
ref: "9f625eb"
resolved-ref: "9f625ebd64e0fd74a94f3c5409282e0e9f825548"
ref: "0b2ee0d"
resolved-ref: "0b2ee0d6d6871a04aaf85e88cd7e877f654d15e3"
url: "https://github.com/stack11/dart_nit_picking"
source: git
version: "0.0.0"

2
packages/neon/pubspec.yaml

@ -69,7 +69,7 @@ dev_dependencies:
nit_picking:
git:
url: https://github.com/stack11/dart_nit_picking
ref: 9f625eb
ref: 0b2ee0d
flutter:
uses-material-design: true

2
packages/nextcloud/pubspec.yaml

@ -26,5 +26,5 @@ dev_dependencies:
nit_picking:
git:
url: https://github.com/stack11/dart_nit_picking
ref: 9f625eb
ref: 0b2ee0d
test: ^1.16.0

6
packages/nextcloud/test/webdav.dart

@ -49,7 +49,7 @@ Future run(final DockerImage image) async {
expect(file.hasPreview, isTrue);
expect(file.mimeType, 'image/png');
expect(file.lastModified!.isBefore(DateTime.now()), isTrue);
expect(file.size!, 50598);
expect(file.size, 50598);
});
test('Create directory', () async {
@ -168,7 +168,7 @@ Future run(final DockerImage image) async {
expect(file.hasPreview, isTrue);
expect(file.mimeType, 'image/png');
expect(file.lastModified!.isBefore(DateTime.now()), isTrue);
expect(file.size!, 50598);
expect(file.size, 50598);
});
test('Get directory props', () async {
@ -189,7 +189,7 @@ Future run(final DockerImage image) async {
expect(file.name, 'test');
expect(file.mimeType, null);
expectDateInReasonableTimeRange(file.lastModified!, DateTime.now());
expect(file.size!, data.lengthInBytes);
expect(file.size, data.lengthInBytes);
});
test('Filter files', () async {

2
packages/nextcloud_push_proxy/pubspec.yaml

@ -13,4 +13,4 @@ dev_dependencies:
nit_picking:
git:
url: https://github.com/stack11/dart_nit_picking
ref: 9f625eb
ref: 0b2ee0d

2
packages/nextcloud_test/pubspec.yaml

@ -15,4 +15,4 @@ dev_dependencies:
nit_picking:
git:
url: https://github.com/stack11/dart_nit_picking
ref: 9f625eb
ref: 0b2ee0d

2
packages/settings/pubspec.yaml

@ -15,4 +15,4 @@ dev_dependencies:
nit_picking:
git:
url: https://github.com/stack11/dart_nit_picking
ref: 9f625eb
ref: 0b2ee0d

2
packages/sort_box/pubspec.yaml

@ -8,5 +8,5 @@ dev_dependencies:
nit_picking:
git:
url: https://github.com/stack11/dart_nit_picking
ref: 9f625eb
ref: 0b2ee0d
test: ^1.21.1

2
packages/spec_templates/pubspec.yaml

@ -13,4 +13,4 @@ dev_dependencies:
nit_picking:
git:
url: https://github.com/stack11/dart_nit_picking
ref: 9f625eb
ref: 0b2ee0d

Loading…
Cancel
Save