From b206597a3b6323af216996c24b178c327a447046 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Mon, 26 Sep 2022 16:54:12 -0700 Subject: [PATCH] initial content --- .github/dependabot.yaml | 8 ++++++ .github/workflows/dart.yaml | 32 +++++++++++++++++++++++ .gitignore | 10 ++++++++ AUTHORS | 6 +++++ CONTRIBUTING.md | 51 +++++++++++++++++++++++++++++++++++++ LICENSE | 27 ++++++++++++++++++++ README.md | 7 +++++ analysis_options.yaml | 1 + lib/sample.dart | 7 +++++ pubspec.yaml | 15 +++++++++++ test/sample_test.dart | 11 ++++++++ 11 files changed, 175 insertions(+) create mode 100644 .github/dependabot.yaml create mode 100644 .github/workflows/dart.yaml create mode 100644 .gitignore create mode 100644 AUTHORS create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE create mode 100644 README.md create mode 100644 analysis_options.yaml create mode 100644 lib/sample.dart create mode 100644 pubspec.yaml create mode 100644 test/sample_test.dart diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 00000000..21448193 --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,8 @@ +# Dependabot configuration file. +version: 2 + +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" diff --git a/.github/workflows/dart.yaml b/.github/workflows/dart.yaml new file mode 100644 index 00000000..521856fc --- /dev/null +++ b/.github/workflows/dart.yaml @@ -0,0 +1,32 @@ +name: Dart + +on: + schedule: + # “At 00:00 (UTC) on Sunday.” + - cron: '0 0 * * 0' + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + # These are the latest versions of the github actions; dependabot will + # send PRs to keep these up-to-date. + - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + + - name: Install dependencies + run: dart pub get + + - name: Verify formatting + run: dart format --output=none --set-exit-if-changed . + + - name: Analyze project source + run: dart analyze --fatal-infos + + - name: Run tests + run: dart test diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..65c34dc8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +# Files and directories created by pub. +.dart_tool/ +.packages + +# Conventional directory for build outputs. +build/ + +# Omit committing pubspec.lock for library packages; see +# https://dart.dev/guides/libraries/private-files#pubspeclock. +pubspec.lock diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 00000000..e8063a8c --- /dev/null +++ b/AUTHORS @@ -0,0 +1,6 @@ +# Below is a list of people and organizations that have contributed +# to the project. Names should be added to the list like so: +# +# Name/Organization + +Google Inc. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..e8a52a4c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,51 @@ +# How to Contribute + +We'd love to accept your patches and contributions to this project. There are +just a few small guidelines you need to follow. + +## Contributor License Agreement + +Contributions to this project must be accompanied by a Contributor License +Agreement (CLA). You (or your employer) retain the copyright to your +contribution; this simply gives us permission to use and redistribute your +contributions as part of the project. Head over to + to see your current agreements on file or +to sign a new one. + +You generally only need to submit a CLA once, so if you've already submitted one +(even if it was for a different project), you probably don't need to do it +again. + +## Code Reviews + +All submissions, including submissions by project members, require review. We +use GitHub pull requests for this purpose. Consult +[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more +information on using pull requests. + +## Coding style + +The Dart source code in this repo follows the: + + * [Dart style guide](https://dart.dev/guides/language/effective-dart/style) + +You should familiarize yourself with those guidelines. + +## File headers + +All files in the Dart project must start with the following header; if you add a +new file please also add this. The year should be a single number stating the +year the file was created (don't use a range like "2011-2012"). Additionally, if +you edit an existing file, you shouldn't update the year. + + // Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file + // 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. + +## Community Guidelines + +This project follows +[Google's Open Source Community Guidelines](https://opensource.google/conduct/). + +We pledge to maintain an open and welcoming environment. For details, see our +[code of conduct](https://dart.dev/code-of-conduct). diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..33474aad --- /dev/null +++ b/LICENSE @@ -0,0 +1,27 @@ +Copyright 2022, the Dart project authors. + +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 LLC 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. diff --git a/README.md b/README.md new file mode 100644 index 00000000..4f82a558 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +[![Dart](https://github.com/dart-lang/ecosystem/actions/workflows/dart.yaml/badge.svg)](https://github.com/dart-lang/ecosystem/actions/workflows/dart.yaml) + +A tool to calculate the API usage for a package. + +## Projects docs + +todo: add a brief project description here diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 00000000..572dd239 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1 @@ +include: package:lints/recommended.yaml diff --git a/lib/sample.dart b/lib/sample.dart new file mode 100644 index 00000000..f2431e2c --- /dev/null +++ b/lib/sample.dart @@ -0,0 +1,7 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// 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. + +void main(List args) { + print('hello world'); +} diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 00000000..7c53c29c --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,15 @@ +name: ecosystem +# If intended for publishing, replace `publish_to: none` with `version: 0.0.1` +publish_to: none +description: A tool to calculate the API usage for a package. +repository: https://github.com/dart-lang/ecosystem + +environment: + sdk: '>=2.18.0 <3.0.0' + +dependencies: + # lib_name: ^1.2.0 + +dev_dependencies: + lints: ^2.0.0 + test: ^1.16.0 diff --git a/test/sample_test.dart b/test/sample_test.dart new file mode 100644 index 00000000..44072d03 --- /dev/null +++ b/test/sample_test.dart @@ -0,0 +1,11 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// 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. + +import 'package:test/test.dart'; + +main() { + group('a group of tests', () { + test('first test', () {}); + }); +}