Skip to content

Commit 08d0b8d

Browse files
committed
Move analysis options into a nested package
This allows other Sass team packages to re-use our analysis configuration without having to copy it.
1 parent 8270dc1 commit 08d0b8d

File tree

5 files changed

+46
-17
lines changed

5 files changed

+46
-17
lines changed

analysis/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
This package provides a shared set of analysis options for use by Sass team
2+
packages. To use it, add it as a Git dependency to your `pubspec.yaml`:
3+
4+
```yaml
5+
dev_dependencies:
6+
sass_analysis:
7+
git: {url: git://github.com/sass/dart-sass.git, path: analysis}
8+
```
9+
10+
and include it in your `analysis_options.yaml`:
11+
12+
```yaml
13+
include: package:sass_analysis/analysis_options.yaml
14+
```

analysis/lib/analysis_options.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
analyzer:
2+
strong-mode:
3+
implicit-casts: false
4+
language:
5+
strict-inference: true
6+
strict-raw-types: true
7+
errors:
8+
missing_js_lib_annotation: ignore
9+
deprecated_member_use_from_same_package: ignore
10+
11+
# These are necessary for matching the JS API.
12+
avoid_types_as_parameter_names: ignore
13+
14+
# This has tons of false positives for StreamSubscription.close().
15+
unawaited_futures: ignore
16+
17+
include: package:pedantic/analysis_options.yaml

analysis/pubspec.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: sass_analysis
2+
version: 0.0.0
3+
description: Shared analysis options for Sass team packages.
4+
author: Sass Team
5+
homepage: https://github.com/sass/dart-sass/tree/master/analysis
6+
7+
publish_to: none
8+
9+
environment:
10+
sdk: ">=2.0.0 <3.0.0"
11+
12+
dependencies:
13+
pedantic: ^1.0.0

analysis_options.yaml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1 @@
1-
analyzer:
2-
strong-mode:
3-
implicit-casts: false
4-
language:
5-
strict-inference: true
6-
strict-raw-types: true
7-
errors:
8-
missing_js_lib_annotation: ignore
9-
deprecated_member_use_from_same_package: ignore
10-
11-
# These are necessary for matching the JS API.
12-
avoid_types_as_parameter_names: ignore
13-
14-
# This has tons of false positives for StreamSubscription.close().
15-
unawaited_futures: ignore
16-
17-
include: package:pedantic/analysis_options.yaml
1+
include: package:sass_analysis/analysis_options.yaml

pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ dev_dependencies:
3939
js: "^0.6.0"
4040
node_preamble: "^1.1.0"
4141
pub_semver: "^1.0.0"
42+
sass_analysis: {path: analysis}
4243
source_span: "^1.5.2"
4344
stream_channel: ">=1.0.0 <3.0.0"
4445
test_descriptor: "^1.1.0"

0 commit comments

Comments
 (0)