Skip to content

Commit 2894fd8

Browse files
committed
boilerplate
0 parents  commit 2894fd8

File tree

6 files changed

+211
-0
lines changed

6 files changed

+211
-0
lines changed

.analysis_options

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Specify analysis options.
2+
#
3+
# Until there are meta linter rules, each desired lint must be explicitly enabled.
4+
# See: https://github.com/dart-lang/linter/issues/288
5+
#
6+
# For a list of lints, see: http://dart-lang.github.io/linter/lints/
7+
# See the configuration guide for more
8+
# https://github.com/dart-lang/sdk/tree/master/pkg/analyzer#configuring-the-analyzer
9+
#
10+
# NOTE: Please keep this file in sync with
11+
# https://github.com/flutter/flutter/blob/master/.analysis_options
12+
13+
analyzer:
14+
language:
15+
enableStrictCallChecks: true
16+
enableSuperMixins: true
17+
enableAssertInitializer: true
18+
strong-mode:
19+
implicit-dynamic: false
20+
errors:
21+
# treat missing required parameters as a warning (not a hint)
22+
missing_required_param: warning
23+
# treat missing returns as a warning (not a hint)
24+
missing_return: warning
25+
# allow having TODOs in the code
26+
todo: ignore
27+
exclude:
28+
- 'bin/cache/**'
29+
# the following two are relative to the stocks example and the flutter package respectively
30+
# see https://github.com/dart-lang/sdk/issues/28463
31+
- 'lib/i18n/stock_messages_*.dart'
32+
- 'lib/src/http/**'
33+
34+
linter:
35+
rules:
36+
# these rules are documented on and in the same order as
37+
# the Dart Lint rules page to make maintenance easier
38+
# http://dart-lang.github.io/linter/lints/
39+
40+
# === error rules ===
41+
- avoid_empty_else
42+
- avoid_slow_async_io
43+
- cancel_subscriptions
44+
# - close_sinks # https://github.com/flutter/flutter/issues/5789
45+
# - comment_references # blocked on https://github.com/dart-lang/dartdoc/issues/1153
46+
- control_flow_in_finally
47+
- empty_statements
48+
- hash_and_equals
49+
# - invariant_booleans # https://github.com/flutter/flutter/issues/5790
50+
- iterable_contains_unrelated_type
51+
- list_remove_unrelated_type
52+
# - literal_only_boolean_expressions # https://github.com/flutter/flutter/issues/5791
53+
- no_adjacent_strings_in_list
54+
- no_duplicate_case_values
55+
- test_types_in_equals
56+
- throw_in_finally
57+
- unrelated_type_equality_checks
58+
- valid_regexps
59+
60+
# === style rules ===
61+
- always_declare_return_types
62+
# - always_put_control_body_on_new_line
63+
- always_require_non_null_named_parameters
64+
- always_specify_types
65+
- annotate_overrides
66+
# - avoid_annotating_with_dynamic # not yet tested
67+
- avoid_as
68+
# - avoid_catches_without_on_clauses # not yet tested
69+
# - avoid_catching_errors # not yet tested
70+
# - avoid_classes_with_only_static_members # not yet tested
71+
# - avoid_function_literals_in_foreach_calls # not yet tested
72+
- avoid_init_to_null
73+
- avoid_null_checks_in_equality_operators
74+
# - avoid_positional_boolean_parameters # not yet tested
75+
- avoid_return_types_on_setters
76+
# - avoid_returning_null # not yet tested
77+
# - avoid_returning_this # not yet tested
78+
# - avoid_setters_without_getters # not yet tested
79+
# - avoid_types_on_closure_parameters # not yet tested
80+
- await_only_futures
81+
- camel_case_types
82+
# - cascade_invocations # not yet tested
83+
# - constant_identifier_names # https://github.com/dart-lang/linter/issues/204
84+
- directives_ordering
85+
- empty_catches
86+
- empty_constructor_bodies
87+
- implementation_imports
88+
# - join_return_with_assignment # not yet tested
89+
- library_names
90+
- library_prefixes
91+
- non_constant_identifier_names
92+
# - omit_local_variable_types # opposite of always_specify_types
93+
# - one_member_abstracts # too many false positives
94+
# - only_throw_errors # https://github.com/flutter/flutter/issues/5792
95+
- overridden_fields
96+
- package_api_docs
97+
- package_prefixed_library_names
98+
# - parameter_assignments # we do this commonly
99+
- prefer_adjacent_string_concatenation
100+
- prefer_collection_literals
101+
# - prefer_conditional_assignment # not yet tested
102+
- prefer_const_constructors
103+
# - prefer_constructors_over_static_methods # not yet tested
104+
- prefer_contains
105+
# - prefer_expression_function_bodies # conflicts with https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#consider-using--for-short-functions-and-methods
106+
# - prefer_final_fields # https://github.com/dart-lang/linter/issues/506
107+
- prefer_final_locals
108+
# - prefer_foreach # not yet tested
109+
# - prefer_function_declarations_over_variables # not yet tested
110+
- prefer_initializing_formals
111+
# - prefer_interpolation_to_compose_strings # not yet tested
112+
- prefer_is_empty
113+
- prefer_is_not_empty
114+
# - public_member_api_docs # this is the only difference from .analysis_options_repo
115+
# - recursive_getters # https://github.com/dart-lang/linter/issues/452
116+
- slash_for_doc_comments
117+
- sort_constructors_first
118+
- sort_unnamed_constructors_first
119+
- super_goes_last
120+
# - type_annotate_public_apis # subset of always_specify_types
121+
- type_init_formals
122+
# - unawaited_futures # https://github.com/flutter/flutter/issues/5793
123+
- unnecessary_brace_in_string_interps
124+
- unnecessary_getters_setters
125+
# - unnecessary_lambdas # https://github.com/dart-lang/linter/issues/498
126+
- unnecessary_null_aware_assignments
127+
- unnecessary_null_in_if_null_operators
128+
# - unnecessary_overrides # https://github.com/dart-lang/linter/issues/626 and https://github.com/dart-lang/linter/issues/627
129+
- unnecessary_this
130+
- use_rethrow_when_possible
131+
# - use_setters_to_change_properties # not yet tested
132+
# - use_string_buffers # https://github.com/dart-lang/linter/pull/664
133+
# - use_to_and_as_if_applicable # has false positives, so we prefer to catch this by code-review
134+
135+
# === pub rules ===
136+
- package_names

.gitattributes

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Always perform LF normalization on these files
5+
*.dart text
6+
*.gradle text
7+
*.html text
8+
*.java text
9+
*.json text
10+
*.md text
11+
*.py text
12+
*.sh text
13+
*.txt text
14+
*.xml text
15+
*.yaml text
16+
17+
# Make sure that these Windows files always have CRLF line endings in checkout
18+
*.bat text eol=crlf
19+
*.ps1 text eol=crlf
20+
21+
# Never perform LF normalization on these files
22+
*.ico binary
23+
*.jar binary
24+
*.png binary
25+
*.zip binary

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.DS_Store
2+
.atom/
3+
.idea
4+
.packages
5+
.pub/
6+
pubspec.lock
7+
8+
Podfile.lock
9+
Pods/
10+
GeneratedPluginRegistrant.h
11+
GeneratedPluginRegistrant.m
12+
13+
GeneratedPluginRegistrant.java
14+

AUTHORS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Below is a list of people and organizations that have contributed
2+
# to the Flutter project. Names should be added to the list like so:
3+
#
4+
# Name/Organization <email address>
5+
6+
Google Inc.

LICENSE

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Copyright 2017, the Flutter project authors. All rights reserved.
2+
Redistribution and use in source and binary forms, with or without
3+
modification, are permitted provided that the following conditions are
4+
met:
5+
6+
* Redistributions of source code must retain the above copyright
7+
notice, this list of conditions and the following disclaimer.
8+
* Redistributions in binary form must reproduce the above
9+
copyright notice, this list of conditions and the following
10+
disclaimer in the documentation and/or other materials provided
11+
with the distribution.
12+
* Neither the name of Google Inc. nor the names of its
13+
contributors may be used to endorse or promote products derived
14+
from this software without specific prior written permission.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Helpful packages for Flutter
2+
3+
This repository contains miscellaneous packages that help you build flutter
4+
apps. It is maintained by the Flutter team.

0 commit comments

Comments
 (0)