mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 22:31:50 +00:00
analyzer: Prefer string interpolations
ignore prefer_interpolation_to_compose_strings and constant_identifier_names in generated files. Change-Id: I963504e298f8e439734522fed9ac09911750f419 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243646 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Samuel Rawlins <srawlins@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
parent
6af134d78b
commit
531e6e175f
|
@ -22,8 +22,6 @@ analyzer:
|
|||
non_constant_identifier_names: ignore
|
||||
overridden_fields: ignore
|
||||
prefer_function_declarations_over_variables: ignore
|
||||
# todo: add ignore to `protocol_generated.dart`
|
||||
prefer_interpolation_to_compose_strings: ignore
|
||||
prefer_void_to_null: ignore
|
||||
provide_deprecation_message: ignore
|
||||
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
// To regenerate the file, use the script
|
||||
// "pkg/analysis_server/tool/spec/generate_files".
|
||||
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: prefer_interpolation_to_compose_strings
|
||||
|
||||
const String PROTOCOL_VERSION = '1.33.0';
|
||||
|
||||
const String ANALYSIS_NOTIFICATION_ANALYZED_FILES = 'analysis.analyzedFiles';
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
// To regenerate the file, use the script
|
||||
// "pkg/analysis_server/tool/spec/generate_files".
|
||||
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: prefer_interpolation_to_compose_strings
|
||||
|
||||
import 'dart:convert' hide JsonDecoder;
|
||||
|
||||
import 'package:analysis_server/protocol/protocol.dart';
|
||||
|
|
|
@ -2374,9 +2374,9 @@ extension MyClassExtension on MyClass {
|
|||
|
||||
// Wait for analysis then edit the content
|
||||
await waitForTasksFinished();
|
||||
var revisedContent = testFileContent.substring(0, 0) +
|
||||
'i' +
|
||||
testFileContent.substring(completionOffset);
|
||||
var precedingContent = testFileContent.substring(0, 0);
|
||||
var trailingContent = testFileContent.substring(completionOffset);
|
||||
var revisedContent = '${precedingContent}i$trailingContent';
|
||||
++completionOffset;
|
||||
server.handleRequest(AnalysisUpdateContentParams(
|
||||
{testFile.path: AddContentOverlay(revisedContent)}).toRequest('add1'));
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
// To regenerate the file, use the script
|
||||
// "pkg/analysis_server/tool/spec/generate_files".
|
||||
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: prefer_interpolation_to_compose_strings
|
||||
|
||||
/// Convenience methods for running integration tests.
|
||||
import 'dart:async';
|
||||
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
// To regenerate the file, use the script
|
||||
// "pkg/analysis_server/tool/spec/generate_files".
|
||||
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: prefer_interpolation_to_compose_strings
|
||||
|
||||
/// Matchers for data types defined in the analysis server API.
|
||||
import 'package:test/test.dart';
|
||||
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
// To regenerate the file, use the script
|
||||
// "pkg/analysis_server/tool/spec/generate_files".
|
||||
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: prefer_interpolation_to_compose_strings
|
||||
|
||||
import 'package:analysis_server_client/protocol.dart';
|
||||
|
||||
/// [NotificationHandler] processes analysis server notifications
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
// To regenerate the file, use the script
|
||||
// "pkg/analysis_server/tool/spec/generate_files".
|
||||
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: prefer_interpolation_to_compose_strings
|
||||
|
||||
import 'dart:convert' hide JsonDecoder;
|
||||
|
||||
import 'package:analysis_server_client/src/protocol/protocol_base.dart';
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
// To regenerate the file, use the script
|
||||
// "pkg/analysis_server/tool/spec/generate_files".
|
||||
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: prefer_interpolation_to_compose_strings
|
||||
|
||||
const String PROTOCOL_VERSION = '1.33.0';
|
||||
|
||||
const String ANALYSIS_NOTIFICATION_ANALYZED_FILES = 'analysis.analyzedFiles';
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
// To regenerate the file, use the script
|
||||
// "pkg/analysis_server/tool/spec/generate_files".
|
||||
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: prefer_interpolation_to_compose_strings
|
||||
|
||||
import 'dart:convert' hide JsonDecoder;
|
||||
|
||||
import 'package:analysis_server_client/src/protocol/protocol_base.dart';
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
// To regenerate the file, use the script
|
||||
// "pkg/analysis_server/tool/spec/generate_files".
|
||||
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: prefer_interpolation_to_compose_strings
|
||||
|
||||
import 'dart:convert' hide JsonDecoder;
|
||||
|
||||
import 'package:analyzer_plugin/protocol/protocol.dart';
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
// To regenerate the file, use the script
|
||||
// "pkg/analysis_server/tool/spec/generate_files".
|
||||
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: prefer_interpolation_to_compose_strings
|
||||
|
||||
const String ANALYSIS_NOTIFICATION_ERRORS = 'analysis.errors';
|
||||
const String ANALYSIS_NOTIFICATION_ERRORS_ERRORS = 'errors';
|
||||
const String ANALYSIS_NOTIFICATION_ERRORS_FILE = 'file';
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
// To regenerate the file, use the script
|
||||
// "pkg/analysis_server/tool/spec/generate_files".
|
||||
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: prefer_interpolation_to_compose_strings
|
||||
|
||||
import 'dart:convert' hide JsonDecoder;
|
||||
|
||||
import 'package:analyzer_plugin/protocol/protocol.dart';
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
// To regenerate the file, use the script
|
||||
// "pkg/analysis_server/tool/spec/generate_files".
|
||||
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: prefer_interpolation_to_compose_strings
|
||||
|
||||
/// Convenience methods for running integration tests.
|
||||
import 'dart:async';
|
||||
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
// To regenerate the file, use the script
|
||||
// "pkg/analysis_server/tool/spec/generate_files".
|
||||
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: prefer_interpolation_to_compose_strings
|
||||
|
||||
/// Matchers for data types defined in the analysis server API.
|
||||
import 'package:test/test.dart';
|
||||
|
||||
|
|
|
@ -168,6 +168,9 @@ class CodeGenerator {
|
|||
// This file has been automatically generated. Please do not edit it manually.
|
||||
// To regenerate the file, use the script
|
||||
// "pkg/analysis_server/tool/spec/generate_files".
|
||||
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: prefer_interpolation_to_compose_strings
|
||||
''';
|
||||
}
|
||||
writeln(header.trim());
|
||||
|
|
Loading…
Reference in a new issue