Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[style] Enable dangling_library_doc_comments lint #809

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pkgs/ffigen/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@ analyzer:
exclude:
- 'test/**_expected*'
# Goldens cannot be generated outside MacOS causing analysis errors.
- test/native_objc_test/**
- test/native_objc_test/**
language:
strict-casts: true
strict-inference: true

linter:
rules:
# Enabled.
dangling_library_doc_comments: true
directives_ordering: true
prefer_final_locals: true
prefer_final_in_for_each: true
use_super_parameters: true

# Disabled.
constant_identifier_names: false
3 changes: 2 additions & 1 deletion pkgs/ffigen/lib/src/config_provider/config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// Validates the yaml input by the user, prints useful info for the user
/// Validates the yaml input by the user, prints useful info for the user.
library;

import 'dart:io';

Expand Down
2 changes: 2 additions & 0 deletions pkgs/ffigen/lib/src/config_provider/config_types.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// BSD-style license that can be found in the LICENSE file.

/// Contains all the neccesary classes required by config.
library;

import 'dart:io';

import 'package:ffigen/src/code_generator.dart';
Expand Down
1 change: 1 addition & 0 deletions pkgs/ffigen/lib/src/config_provider/path_finder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.

/// Utils for finding header paths on system.
library;

import 'dart:io';

Expand Down
1 change: 1 addition & 0 deletions pkgs/ffigen/lib/src/header_parser/includer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

/// Utility functions to check whether a binding should be parsed or not
/// based on filters.
library;

import '../config_provider/config_types.dart';
import '../strings.dart' as strings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// BSD-style license that can be found in the LICENSE file.

/// Extracts code_gen Type from type.
library;

import 'package:ffigen/src/code_generator.dart';
import 'package:ffigen/src/header_parser/sub_parsers/function_type_param_parser.dart';
import 'package:ffigen/src/header_parser/sub_parsers/typedefdecl_parser.dart';
Expand Down
1 change: 1 addition & 0 deletions pkgs/ffigen/test/native_test/build_test_dylib.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
/// =======================================================================
/// =======================================================================
/// =======================================================================
library;

import 'dart:io';

Expand Down
1 change: 1 addition & 0 deletions pkgs/jni/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ analyzer:

linter:
rules:
- dangling_library_doc_comments
- prefer_final_locals
- prefer_const_declarations
# Additional information about this file can be found at
Expand Down
2 changes: 1 addition & 1 deletion pkgs/jni/example/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ linter:
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
- dangling_library_doc_comments
- prefer_final_locals
- prefer_const_declarations
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
1 change: 1 addition & 0 deletions pkgs/jnigen/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ analyzer:

linter:
rules:
- dangling_library_doc_comments
- prefer_final_locals
- prefer_const_declarations
- unawaited_futures
Expand Down
2 changes: 1 addition & 1 deletion pkgs/jnigen/android_test_runner/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ linter:
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
- dangling_library_doc_comments
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
2 changes: 1 addition & 1 deletion pkgs/jnigen/example/in_app_java/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ linter:
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
- dangling_library_doc_comments
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ linter:
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
- dangling_library_doc_comments
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ include: package:lints/recommended.yaml

# Uncomment the following section to specify additional rules.

# linter:
# rules:
linter:
rules:
- dangling_library_doc_comments
# - camel_case_types

# analyzer:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ linter:
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
- dangling_library_doc_comments
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
1 change: 1 addition & 0 deletions pkgs/native_assets_builder/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ analyzer:

linter:
rules:
- dangling_library_doc_comments
- prefer_const_declarations
- prefer_expression_function_bodies
- prefer_final_in_for_each
Expand Down
1 change: 1 addition & 0 deletions pkgs/native_assets_cli/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ analyzer:

linter:
rules:
- dangling_library_doc_comments
- prefer_const_declarations
- prefer_expression_function_bodies
- prefer_final_in_for_each
Expand Down
1 change: 1 addition & 0 deletions pkgs/native_toolchain_c/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ analyzer:

linter:
rules:
- dangling_library_doc_comments
- prefer_const_declarations
- prefer_expression_function_bodies
- prefer_final_in_for_each
Expand Down
Loading