Skip to content

Merge master branch into nnbd branch #2885

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

Merged
merged 6 commits into from
Jan 8, 2022
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
30 changes: 19 additions & 11 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,22 @@ analyzer:
- 'testing/test_package_export_error/**'
linter:
rules:
- always_declare_return_types
- always_put_required_named_parameters_first
- avoid_bool_literals_in_conditional_expressions
- avoid_unused_constructor_parameters
- directives_ordering
- no_adjacent_strings_in_list
- package_api_docs
- prefer_single_quotes
- sort_child_properties_last
- unawaited_futures
- unnecessary_null_aware_assignments
always_declare_return_types: true
always_put_required_named_parameters_first: true
avoid_bool_literals_in_conditional_expressions: true
avoid_dynamic_calls: true
avoid_single_cascade_in_expression_statements: true
avoid_unused_constructor_parameters: true
avoid_init_to_null: true
directives_ordering: true
no_adjacent_strings_in_list: true
package_api_docs: true
prefer_final_fields: true
prefer_initializing_formals: true
prefer_single_quotes: true
prefer_void_to_null: true
slash_for_doc_comments: true
type_annotate_public_apis: true
# Work in progress canonical score lints
unawaited_futures: true
unnecessary_null_aware_assignments: true
30 changes: 19 additions & 11 deletions analysis_options_presubmit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,22 @@ analyzer:
- 'testing/test_package_bad/**'
linter:
rules:
- always_declare_return_types
- always_put_required_named_parameters_first
- avoid_bool_literals_in_conditional_expressions
- avoid_unused_constructor_parameters
- directives_ordering
- no_adjacent_strings_in_list
- package_api_docs
- prefer_single_quotes
- sort_child_properties_last
- unawaited_futures
- unnecessary_null_aware_assignments
always_declare_return_types: true
always_put_required_named_parameters_first: true
avoid_bool_literals_in_conditional_expressions: true
avoid_dynamic_calls: true
avoid_single_cascade_in_expression_statements: true
avoid_unused_constructor_parameters: true
avoid_init_to_null: true
directives_ordering: true
no_adjacent_strings_in_list: true
package_api_docs: true
prefer_final_fields: true
prefer_initializing_formals: true
prefer_single_quotes: true
prefer_void_to_null: true
slash_for_doc_comments: true
type_annotate_public_apis: true
# Work in progress canonical score lints
unawaited_futures: true
unnecessary_null_aware_assignments: true
2 changes: 2 additions & 0 deletions lib/options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@ class DartdocGeneratorOptionContext extends DartdocOptionContext {
String? get relCanonicalPrefix =>
optionSet['relCanonicalPrefix'].valueAt(context);

/// The 'templatesDir' dartdoc option if one was specified; otherwise `null`.
String? get templatesDir => optionSet['templatesDir'].valueAt(context);

// TODO(jdkoren): duplicated temporarily so that GeneratorContext is enough for configuration.
@override
bool get useBaseHref => optionSet['useBaseHref'].valueAt(context);

/// The 'resourcesDir' dartdoc option if one was specified; otherwise `null`.
String? get resourcesDir => optionSet['resourcesDir'].valueAt(context);
}

Expand Down