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 b) {
final s = schema.ofs![results.indexOf(result)]; final s = schema.ofs![results.indexOf(result)];
b b
..name = fields[result.name]! ..name = fields[result.name]
..type = refer(_makeNullable(result.name, true)) ..type = refer(_makeNullable(result.name, true))
..modifier = FieldModifier.final$ ..modifier = FieldModifier.final$
..docs.addAll([ ..docs.addAll([

2
packages/dynamite/pubspec.yaml

@ -17,4 +17,4 @@ dev_dependencies:
nit_picking: nit_picking:
git: git:
url: https://github.com/stack11/dart_nit_picking 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: nit_picking:
git: git:
url: https://github.com/stack11/dart_nit_picking url: https://github.com/stack11/dart_nit_picking
ref: 9f625eb ref: 0b2ee0d
flutter: flutter:
fonts: fonts:

2
packages/neon/analysis_options.yaml

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

4
packages/neon/lib/main.dart

@ -17,7 +17,9 @@ Future main() async {
} }
env = Env.fromMap(dotenv.env); env = Env.fromMap(dotenv.env);
} }
} catch (e) {} } catch (e) {
debugPrint('Failed to load env: $e');
}
WidgetsFlutterBinding.ensureInitialized(); 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), child: Text(AppLocalizations.of(context).filesCreateFolder),
), ),
ElevatedButton( ElevatedButton(
onPressed: !(const ListEquality().equals(originalPath, pathSnapshot.data!)) onPressed: !(const ListEquality().equals(originalPath, pathSnapshot.data))
? () => Navigator.of(context).pop(pathSnapshot.data!) ? () => Navigator.of(context).pop(pathSnapshot.data)
: null, : null,
child: Text(AppLocalizations.of(context).filesChooseFolder), 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, hasPreview: null,
isFavorite: null, isFavorite: null,
), ),
uploadProgress: uploadTaskProgressSnapshot.data!, uploadProgress: uploadTaskProgressSnapshot.data,
downloadProgress: null, 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 { onPressed: () async {
await Clipboard.setData( await Clipboard.setData(
ClipboardData( ClipboardData(
text: widget.feed.lastUpdateError!, text: widget.feed.lastUpdateError,
), ),
); );
if (mounted) { if (mounted) {

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

@ -53,13 +53,13 @@ class _HomePageState extends State<HomePage> {
bool? supported; bool? supported;
switch (id) { switch (id) {
case 'core': case 'core':
supported = await widget.account.client.core.isSupported(result.data!); supported = await widget.account.client.core.isSupported(result.data);
break; break;
case 'news': case 'news':
supported = await widget.account.client.news.isSupported(); supported = await widget.account.client.news.isSupported();
break; break;
case 'notes': case 'notes':
supported = await widget.account.client.notes.isSupported(result.data!); supported = await widget.account.client.notes.isSupported(result.data);
break; break;
} }
if (!(supported ?? true)) { if (!(supported ?? true)) {
@ -460,7 +460,7 @@ class _HomePageState extends State<HomePage> {
if (accounts.length > 1) ...[ if (accounts.length > 1) ...[
Text( Text(
account.client.humanReadableID, 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) ...[ if (accounts.length > 1) ...[
Text( Text(
account.client.humanReadableID, 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); _loginBloc = LoginBloc(_packageInfo);
if (widget.serverURL != null) { if (widget.serverURL != null) {
_loginBloc.setServerURL(widget.serverURL!); _loginBloc.setServerURL(widget.serverURL);
} }
_loginBloc.loginFlowInit.listen((final init) { _loginBloc.loginFlowInit.listen((final init) {

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

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

4
packages/neon/pubspec.lock

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

2
packages/neon/pubspec.yaml

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

2
packages/nextcloud/pubspec.yaml

@ -26,5 +26,5 @@ dev_dependencies:
nit_picking: nit_picking:
git: git:
url: https://github.com/stack11/dart_nit_picking url: https://github.com/stack11/dart_nit_picking
ref: 9f625eb ref: 0b2ee0d
test: ^1.16.0 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.hasPreview, isTrue);
expect(file.mimeType, 'image/png'); expect(file.mimeType, 'image/png');
expect(file.lastModified!.isBefore(DateTime.now()), isTrue); expect(file.lastModified!.isBefore(DateTime.now()), isTrue);
expect(file.size!, 50598); expect(file.size, 50598);
}); });
test('Create directory', () async { test('Create directory', () async {
@ -168,7 +168,7 @@ Future run(final DockerImage image) async {
expect(file.hasPreview, isTrue); expect(file.hasPreview, isTrue);
expect(file.mimeType, 'image/png'); expect(file.mimeType, 'image/png');
expect(file.lastModified!.isBefore(DateTime.now()), isTrue); expect(file.lastModified!.isBefore(DateTime.now()), isTrue);
expect(file.size!, 50598); expect(file.size, 50598);
}); });
test('Get directory props', () async { test('Get directory props', () async {
@ -189,7 +189,7 @@ Future run(final DockerImage image) async {
expect(file.name, 'test'); expect(file.name, 'test');
expect(file.mimeType, null); expect(file.mimeType, null);
expectDateInReasonableTimeRange(file.lastModified!, DateTime.now()); expectDateInReasonableTimeRange(file.lastModified!, DateTime.now());
expect(file.size!, data.lengthInBytes); expect(file.size, data.lengthInBytes);
}); });
test('Filter files', () async { test('Filter files', () async {

2
packages/nextcloud_push_proxy/pubspec.yaml

@ -13,4 +13,4 @@ dev_dependencies:
nit_picking: nit_picking:
git: git:
url: https://github.com/stack11/dart_nit_picking 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: nit_picking:
git: git:
url: https://github.com/stack11/dart_nit_picking 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: nit_picking:
git: git:
url: https://github.com/stack11/dart_nit_picking 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: nit_picking:
git: git:
url: https://github.com/stack11/dart_nit_picking url: https://github.com/stack11/dart_nit_picking
ref: 9f625eb ref: 0b2ee0d
test: ^1.21.1 test: ^1.21.1

2
packages/spec_templates/pubspec.yaml

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

Loading…
Cancel
Save