Unverified Commit 7e017d31 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Enable file_names and package_names lints (#77087)

parent 6250613e
...@@ -113,7 +113,7 @@ linter: ...@@ -113,7 +113,7 @@ linter:
- empty_constructor_bodies - empty_constructor_bodies
- empty_statements - empty_statements
- exhaustive_cases - exhaustive_cases
# - file_names # not yet tested - file_names
- flutter_style_todos - flutter_style_todos
- hash_and_equals - hash_and_equals
- implementation_imports - implementation_imports
...@@ -140,7 +140,7 @@ linter: ...@@ -140,7 +140,7 @@ linter:
# - only_throw_errors # https://github.com/flutter/flutter/issues/5792 # - only_throw_errors # https://github.com/flutter/flutter/issues/5792
- overridden_fields - overridden_fields
- package_api_docs - package_api_docs
# - package_names # non conforming packages in sdk - package_names
- package_prefixed_library_names - package_prefixed_library_names
# - parameter_assignments # we do this commonly # - parameter_assignments # we do this commonly
- prefer_adjacent_string_concatenation - prefer_adjacent_string_concatenation
......
...@@ -12,7 +12,7 @@ import 'src/color_filter_and_fade.dart'; ...@@ -12,7 +12,7 @@ import 'src/color_filter_and_fade.dart';
import 'src/cubic_bezier.dart'; import 'src/cubic_bezier.dart';
import 'src/cull_opacity.dart'; import 'src/cull_opacity.dart';
import 'src/filtered_child_animation.dart'; import 'src/filtered_child_animation.dart';
import 'src/fullscreenTextField.dart'; import 'src/fullscreen_textfield.dart';
import 'src/heavy_grid_view.dart'; import 'src/heavy_grid_view.dart';
import 'src/large_image_changer.dart'; import 'src/large_image_changer.dart';
import 'src/large_images.dart'; import 'src/large_images.dart';
......
...@@ -99,7 +99,7 @@ Future<void> run(List<String> arguments) async { ...@@ -99,7 +99,7 @@ Future<void> run(List<String> arguments) async {
// Analyze all the sample code in the repo // Analyze all the sample code in the repo
print('$clock Sample code...'); print('$clock Sample code...');
await runCommand(dart, await runCommand(dart,
<String>[path.join(flutterRoot, 'dev', 'bots', 'analyze-sample-code.dart')], <String>[path.join(flutterRoot, 'dev', 'bots', 'analyze_sample_code.dart')],
workingDirectory: flutterRoot, workingDirectory: flutterRoot,
); );
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
// See ../snippets/README.md for documentation. // See ../snippets/README.md for documentation.
// To run this, from the root of the Flutter repository: // To run this, from the root of the Flutter repository:
// bin/cache/dart-sdk/bin/dart dev/bots/analyze-sample-code.dart // bin/cache/dart-sdk/bin/dart dev/bots/analyze_sample_code.dart
import 'dart:io'; import 'dart:io';
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// This file is used by ../analyze-sample-code_test.dart, which depends on the // This file is used by ../analyze_sample_code_test.dart, which depends on the
// precise contents (including especially the comments) of this file. // precise contents (including especially the comments) of this file.
// Examples can assume: // Examples can assume:
......
...@@ -7,10 +7,10 @@ import 'dart:io'; ...@@ -7,10 +7,10 @@ import 'dart:io';
import 'common.dart'; import 'common.dart';
void main() { void main() {
test('analyze-sample-code', () { test('analyze_sample_code', () {
final ProcessResult process = Process.runSync( final ProcessResult process = Process.runSync(
'../../bin/cache/dart-sdk/bin/dart', '../../bin/cache/dart-sdk/bin/dart',
<String>['analyze-sample-code.dart', 'test/analyze-sample-code-test-input'], <String>['analyze_sample_code.dart', 'test/analyze-sample-code-test-input'],
); );
final List<String> stdoutLines = process.stdout.toString().split('\n'); final List<String> stdoutLines = process.stdout.toString().split('\n');
final List<String> stderrLines = process.stderr.toString().split('\n') final List<String> stderrLines = process.stderr.toString().split('\n')
......
...@@ -63,7 +63,7 @@ when generating the HTML to put into the Dart docs. ...@@ -63,7 +63,7 @@ when generating the HTML to put into the Dart docs.
#### Analysis #### Analysis
The `../bots/analyze-sample-code.dart` script finds code inside the `@tool The `../bots/analyze_sample_code.dart` script finds code inside the `@tool
snippet` sections and uses the Dart analyzer to check them. snippet` sections and uses the Dart analyzer to check them.
There are several kinds of sample code you can specify: There are several kinds of sample code you can specify:
...@@ -165,7 +165,7 @@ For more information about how to create, use, or update templates, see ...@@ -165,7 +165,7 @@ For more information about how to create, use, or update templates, see
#### Analysis #### Analysis
The `../bots/analyze-sample-code.dart` script finds code inside the `@tool The `../bots/analyze_sample_code.dart` script finds code inside the `@tool
sample` sections and uses the Dart analyzer to check them after applying the sample` sections and uses the Dart analyzer to check them after applying the
specified template. specified template.
...@@ -222,7 +222,7 @@ generating the entire docs output takes a long time. ...@@ -222,7 +222,7 @@ generating the entire docs output takes a long time.
Instead, you can run the analysis locally with this command from the Flutter root: Instead, you can run the analysis locally with this command from the Flutter root:
``` ```
TMPDIR=/tmp bin/cache/dart-sdk/bin/dart dev/bots/analyze-sample-code.dart --temp=samples TMPDIR=/tmp bin/cache/dart-sdk/bin/dart dev/bots/analyze_sample_code.dart --temp=samples
``` ```
This will analyze the samples, and leave the generated files in `/tmp/samples` This will analyze the samples, and leave the generated files in `/tmp/samples`
......
...@@ -67,7 +67,7 @@ void _tests() { ...@@ -67,7 +67,7 @@ void _tests() {
if (childSearch != null) { if (childSearch != null) {
return childSearch; return childSearch;
} }
} else if (entity is File && entity.path.endsWith('semantics_tester_generateTestSemanticsExpressionForCurrentSemanticsTree_test.dart')) { } else if (entity is File && entity.path.endsWith('semantics_tester_generate_test_semantics_expression_for_current_semantics_tree_test.dart')) {
return entity; return entity;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment