Skip to content

Commit 4a94350

Browse files
authored
Merge pull request #693 from dart-lang/merge-code_builder-package
Merge `package:code_builder`
2 parents d7a7e2e + 8ae2f9f commit 4a94350

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+14547
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
name: "package:code_builder"
3+
about: "Create a bug or file a feature request against package:code_builder."
4+
labels: "package:code_builder"
5+
---

.github/labeler.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
- changed-files:
3333
- any-glob-to-any-file: 'pkgs/clock/**'
3434

35+
'package:code_builder':
36+
- changed-files:
37+
- any-glob-to-any-file: 'pkgs/code_builder/**'
38+
3539
'package:coverage':
3640
- changed-files:
3741
- any-glob-to-any-file: 'pkgs/coverage/**'
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: package:code_builder
2+
3+
on:
4+
# Run on PRs and pushes to the default branch.
5+
push:
6+
branches: [ main ]
7+
paths:
8+
- '.github/workflows/code_builder.yml'
9+
- 'pkgs/code_builder/**'
10+
pull_request:
11+
branches: [ main ]
12+
paths:
13+
- '.github/workflows/code_builder.yml'
14+
- 'pkgs/code_builder/**'
15+
schedule:
16+
- cron: "0 0 * * 0"
17+
18+
env:
19+
PUB_ENVIRONMENT: bot.github
20+
21+
22+
defaults:
23+
run:
24+
working-directory: pkgs/code_builder/
25+
26+
jobs:
27+
# Check code formatting and static analysis on a single OS (linux)
28+
# against Dart dev and an earlier stable version.
29+
analyze:
30+
runs-on: ubuntu-latest
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
sdk: [dev]
35+
steps:
36+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
37+
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
38+
with:
39+
sdk: ${{ matrix.sdk }}
40+
- id: install
41+
name: Install dependencies
42+
run: dart pub get
43+
- name: Check formatting
44+
run: dart format --output=none --set-exit-if-changed .
45+
if: always() && steps.install.outcome == 'success'
46+
- name: Analyze code
47+
run: dart analyze --fatal-infos .
48+
if: always() && steps.install.outcome == 'success'
49+
50+
test:
51+
needs: analyze
52+
runs-on: ${{ matrix.os }}
53+
strategy:
54+
fail-fast: false
55+
matrix:
56+
os: [ubuntu-latest]
57+
sdk: [3.5.0, dev]
58+
steps:
59+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
60+
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
61+
with:
62+
sdk: ${{ matrix.sdk }}
63+
- id: install
64+
name: Install dependencies
65+
run: dart pub get
66+
- name: Run VM tests
67+
run: dart test --platform vm
68+
if: always() && steps.install.outcome == 'success'

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ don't naturally belong to other topic monorepos (like
2121
| [cli_config](pkgs/cli_config/) | A library to take config values from configuration files, CLI arguments, and environment variables. | [![pub package](https://img.shields.io/pub/v/cli_config.svg)](https://pub.dev/packages/cli_config) |
2222
| [cli_util](pkgs/cli_util/) | A library to help in building Dart command-line apps. | [![pub package](https://img.shields.io/pub/v/cli_util.svg)](https://pub.dev/packages/cli_util) |
2323
| [clock](pkgs/clock/) | A fakeable wrapper for dart:core clock APIs. | [![pub package](https://img.shields.io/pub/v/clock.svg)](https://pub.dev/packages/clock) |
24+
| [code_builder](pkgs/code_builder/) | A fluent, builder-based library for generating valid Dart code. | [![pub package](https://img.shields.io/pub/v/code_builder.svg)](https://pub.dev/packages/code_builder) |
2425
| [coverage](pkgs/coverage/) | Coverage data manipulation and formatting. | [![pub package](https://img.shields.io/pub/v/coverage.svg)](https://pub.dev/packages/coverage) |
2526
| [csslib](pkgs/csslib/) | A library for parsing and analyzing CSS (Cascading Style Sheets). | [![pub package](https://img.shields.io/pub/v/csslib.svg)](https://pub.dev/packages/csslib) |
2627
| [extension_discovery](pkgs/extension_discovery/) | A convention and utilities for package extension discovery. | [![pub package](https://img.shields.io/pub/v/extension_discovery.svg)](https://pub.dev/packages/extension_discovery) |

pkgs/code_builder/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Files and directories created by pub
2+
.dart_tool
3+
.packages
4+
.pub
5+
pubspec.lock

pkgs/code_builder/AUTHORS

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

0 commit comments

Comments
 (0)