Skip to content

Commit

Permalink
Initial project setup
Browse files Browse the repository at this point in the history
  • Loading branch information
tvolkert committed Sep 20, 2017
0 parents commit cccc818
Show file tree
Hide file tree
Showing 10 changed files with 283 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .analysis_options
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
analyzer:
strong-mode: true
language:
enableStrictCallChecks: true
enableSuperMixins: true
errors:
# treat missing required parameters as a warning (not a hint)
missing_required_param: warning
# Allow having TODOs in the code
todo: ignore

linter:
rules:
# these rules are documented on and in the same order as
# the Dart Lint rules page to make maintenance easier
# http://dart-lang.github.io/linter/lints/

# === error rules ===
- avoid_empty_else
- comment_references
- cancel_subscriptions
- close_sinks
- control_flow_in_finally
- empty_statements
- hash_and_equals
- invariant_booleans
- iterable_contains_unrelated_type
- list_remove_unrelated_type
- literal_only_boolean_expressions
- test_types_in_equals
- throw_in_finally
- unrelated_type_equality_checks
- valid_regexps

# === style rules ===
- always_declare_return_types
- always_specify_types
- annotate_overrides
# TODO - avoid_as
- avoid_init_to_null
- avoid_return_types_on_setters
- await_only_futures
- camel_case_types
- constant_identifier_names
- control_flow_in_finally
- empty_catches
- empty_constructor_bodies
- implementation_imports
- library_names
- library_prefixes
- non_constant_identifier_names
- one_member_abstracts
- only_throw_errors
- overridden_fields
- package_api_docs
- package_prefixed_library_names
- prefer_is_not_empty
- public_member_api_docs
- slash_for_doc_comments
- sort_constructors_first
- sort_unnamed_constructors_first
- super_goes_last
- type_annotate_public_apis
- type_init_formals
# TODO - unawaited_futures (https://github.com/dart-lang/linter/issues/419)
- unnecessary_brace_in_string_interp
- unnecessary_getters_setters

# === pub rules ===
- package_names
25 changes: 25 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Auto detect text files and perform LF normalization
* text=auto

# Always perform LF normalization on these files
*.dart text
*.gradle text
*.html text
*.java text
*.json text
*.md text
*.py text
*.sh text
*.txt text
*.xml text
*.yaml text

# Make sure that these Windows files always have CRLF line endings in checkout
*.bat text eol=crlf
*.ps1 text eol=crlf

# Never perform LF normalization on these files
*.ico binary
*.jar binary
*.png binary
*.zip binary
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### Dart template
# Don’t commit the following directories created by pub.
.buildlog
.pub/
build/
packages
.packages

# Or the files created by dart2js.
*.dart.js
*.js_
*.js.deps
*.js.map

# Include when developing application packages.
pubspec.lock

# IDE
.project
.settings
.idea
.c9
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: dart
sudo: false
dart:
- stable
- dev
script: ./tool/travis.sh
6 changes: 6 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Below is a list of people and organizations that have contributed
# to the Flutter project. Names should be added to the list like so:
#
# Name/Organization <email address>

Google Inc.
69 changes: 69 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
Contributing to Flutter Widgets
===============================

_See also: [Flutter's code of conduct](https://flutter.io/design-principles/#code-of-conduct)_

Things you will need
--------------------

* Linux, Mac OS X, or Windows.
* git (used for source version control).
* An ssh client (used to authenticate with GitHub).

Getting the code and configuring your environment
-------------------------------------------------

* Ensure all the dependencies described in the previous section are installed.
* Fork `https://github.com/google/flutter.widgets` into your own GitHub account.
If you already have a fork and are now installing a development environment on
a new machine, make sure you've updated your fork so that you don't use stale
configuration options from long ago.
* If you haven't configured your machine with an SSH key that's known to github, then
follow [GitHub's directions](https://help.github.com/articles/generating-ssh-keys/)
to generate an SSH key.
* `git clone git@github.com:<your_name_here>/flutter.widgets.git`
* `cd widgets`
* `git remote add upstream git@github.com:google/flutter.widgets.git`
(So that you fetch from the master repository, not your clone, when running
`git fetch` et al.)

Contributing code
-----------------

We gladly accept contributions via GitHub pull requests.

Please peruse Flutter's
[style guide](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo) and
[design principles](https://flutter.io/design-principles/) before
working on anything non-trivial. These guidelines are intended to
keep the code consistent and avoid common pitfalls.

To start working on a patch:

* `git fetch upstream`
* `git checkout upstream/master -b <name_of_your_branch>`
* Hack away.
* `git commit -a -m "<your informative commit message>"`
* `git push origin <name_of_your_branch>`

To send us a pull request:

* `git pull-request` (if you are using [Hub](http://github.com/github/hub/)) or
go to `https://github.com/google/flutter.widgets` and click the
"Compare & pull request" button

Please make sure all your checkins have detailed commit messages explaining the patch.

Once you've gotten an LGTM from a project maintainer and once your PR has received
the green light from all our automated testing (Travis, Appveyor, etc), submit your
changes to the `master` branch using one of the following methods:

* Wait for one of the project maintainers to submit it for you.
* Click the green "Merge pull request" button on the GitHub UI of your pull
request (requires commit access).

You must complete the
[Contributor License Agreement](https://cla.developers.google.com/clas).
You can do this online, and it only takes a minute.
If you've never submitted code before, you must add your (or your
organization's) name and contact info to the [AUTHORS](AUTHORS) file.
26 changes: 26 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Copyright 2017 Google, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Flutter widgets

[![Build Status](https://travis-ci.org/google/flutter.widgets.svg?branch=master)](https://travis-ci.org/google/flutter.widgets)

This repository contains the source code for various Flutter widgets that are
developed by Google but not by the core Flutter team.

## Issues

Please file any issues, bugs, or feature requests in the [this
repo](https://github.com/google/flutter.widgets/issues/new).

## Contributing

If you wish to contribute a change to any of the existing widgets in this repo,
please review our [contribution guide](https://github.com/google/flutter.widgets/blob/master/CONTRIBUTING.md),
and send a [pull request](https://github.com/google/flutter.widgets/pulls).
13 changes: 13 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
install:
- choco install dart-sdk
- ps: refreshenv
- refreshenv
- set DART_DIR=c:\tools\dart-sdk\bin
- set PUB_EXECUTABLE=pub.bat
- ps: pwd
- pub get

build: off

test_script:
- pub run test
29 changes: 29 additions & 0 deletions tool/travis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

# Make sure dartfmt is run on everything
echo "Checking dartfmt..."
NEEDS_DARTFMT="$(dartfmt -n lib test tool)"
if [[ ${NEEDS_DARTFMT} != "" ]]
then
echo "FAILED"
echo "${NEEDS_DARTFMT}"
exit 1
fi
echo "PASSED"

# Make sure we pass the analyzer
echo "Checking dartanalyzer..."
FAILS_ANALYZER="$(find lib test tool -name "*.dart" | xargs dartanalyzer --options .analysis_options)"
if [[ $FAILS_ANALYZER == *"[error]"* ]]
then
echo "FAILED"
echo "${FAILS_ANALYZER}"
exit 1
fi
echo "PASSED"

# Fast fail the script on failures.
set -e

# Run the tests.
pub run test

0 comments on commit cccc818

Please sign in to comment.