Skip to content

Commit

Permalink
Drop unneeded library directives (#6815)
Browse files Browse the repository at this point in the history
*Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.*

*List which issues are fixed by this PR.*

*Please add a note to `packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md` if your change requires release notes. Otherwise, add the 'release-notes-not-required' label to the PR.*

![build.yaml badge]

If you need help, consider asking for help on [Discord].

[build.yaml badge]: https://github.com/flutter/devtools/actions/workflows/build.yaml/badge.svg
  • Loading branch information
kevmoo authored Nov 22, 2023
1 parent 6fcd698 commit b9c3de7
Show file tree
Hide file tree
Showing 21 changed files with 17 additions and 37 deletions.
2 changes: 2 additions & 0 deletions packages/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ linter:
- unnecessary_const
- unnecessary_getters_setters
# - unnecessary_lambdas # https://github.com/dart-lang/linter/issues/498
- unnecessary_library_directive
- unnecessary_new
- unnecessary_null_aware_assignments
- unnecessary_null_in_if_null_operators
Expand All @@ -138,6 +139,7 @@ linter:
- use_rethrow_when_possible
# - use_setters_to_change_properties # not yet tested
# - use_string_buffers # https://github.com/dart-lang/linter/pull/664
- use_string_in_part_of_directives
# - use_to_and_as_if_applicable # has false positives, so we prefer to catch this by code-review
- valid_regexps
# - void_checks # not yet tested
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
/// with some refactors to make the code more of a controller than a combination
/// of view and controller. View specific portions of InspectorPanel.java have
/// been moved to inspector.dart.
library inspector_controller;
library;

import 'dart:async';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

library inspector_tree;

import 'dart:async';
import 'dart:collection';
import 'dart:math';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
// found in the LICENSE file.

/// A few utilities related to evaluating dart code
library eval;
library;

import 'dart:async';

Expand Down
2 changes: 0 additions & 2 deletions packages/devtools_app/lib/src/service/service_extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

library service_extensions;

import 'package:devtools_app_shared/service_extensions.dart' as extensions;
import 'package:flutter/material.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

// Code needs to match API from VmService.
// ignore_for_file: avoid-dynamic
library vm_service_wrapper;

import 'dart:async';
import 'dart:convert';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// Avoid unused parameters does not play well with conditional imports.
// ignore_for_file: avoid-unused-parameters
// ignore_for_file: avoid-redundant-async
library _analytics_stub;

import 'dart:async';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

@JS()
library gtags;

// ignore_for_file: non_constant_identifier_names

@JS()
library;

import 'dart:async';

import 'package:devtools_app_shared/ui.dart';
Expand Down
6 changes: 3 additions & 3 deletions packages/devtools_app/lib/src/shared/analytics/gtags.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

@JS()
library gtags;

// ignore_for_file: non_constant_identifier_names

@JS()
library;

import 'package:flutter/foundation.dart';
import 'package:js/js.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
/// This library must not have direct dependencies on web-only libraries.
///
/// This allows tests of the complicated logic in this class to run on the VM.
library inspector_tree;
library;

import 'package:devtools_app_shared/ui.dart';
import 'package:flutter/foundation.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// ignore_for_file: unused_element
// ignore_for_file: unused_local_variable

part of http;
part of 'http.dart';

class Cookie {
String? _name;
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools_app/lib/src/shared/http/_http_date.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// ignore_for_file: unused_local_variable
// ignore_for_file: avoid-throw-in-catch-block

part of http;
part of 'http.dart';

// TODO(jacobr): cleanup this class with only static members.
// ignore: avoid_classes_with_only_static_members
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// This code was pulled from dart:io.

part of http;
part of 'http.dart';

class HttpException {
const HttpException(this.message, {this.uri});
Expand Down
3 changes: 1 addition & 2 deletions packages/devtools_app/lib/src/shared/http/http.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
// found in the LICENSE file.

/// This library contains code pulled from dart:io that is not platform specific.
library http;
library;

part '_http_cookies.dart';
part '_http_date.dart';
Expand Down
3 changes: 1 addition & 2 deletions packages/devtools_app/lib/src/shared/ui/icons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
/// to handle the actual platform specific icon rendering.
/// The benefit of this approach is that icons can be const objects and tests
/// of code that uses icons can run on the Dart VM.
library icons;
library;

import 'package:devtools_app_shared/ui.dart';
import 'package:flutter/material.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

library debugger;

import 'package:devtools_shared/devtools_test_utils.dart';
import 'package:flutter_test/flutter_test.dart';

Expand Down
3 changes: 1 addition & 2 deletions packages/devtools_app/test/test_infra/matchers/matchers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@

// ignore_for_file: avoid_print

library matchers;

import 'dart:io' as io;

import 'package:devtools_app/src/shared/diagnostics/diagnostics_node.dart';
import 'package:flutter_test/flutter_test.dart';

import '_golden_matcher_io.dart'
if (dart.library.js_interop) '_golden_matcher_web.dart' as golden_matcher;

Expand Down
2 changes: 0 additions & 2 deletions packages/devtools_extensions/lib/api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

library api;

export 'src/api/api.dart';
export 'src/api/model.dart';
2 changes: 0 additions & 2 deletions packages/devtools_extensions/lib/devtools_extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

library template;

export 'src/template/devtools_extension.dart';
2 changes: 0 additions & 2 deletions packages/devtools_extensions/lib/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

library utils;

export 'src/utils.dart';
2 changes: 0 additions & 2 deletions third_party/packages/widget_icons/lib/widget_icons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

// ignore_for_file: constant_identifier_names

library widget_icons;

import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

Expand Down

0 comments on commit b9c3de7

Please sign in to comment.