Skip to content

Commit 2ac3c1d

Browse files
authored
Change command line flag allow-tools default to false (#1986)
* Change command line flag allow-tools default to false * update changelog
1 parent 3980fca commit 2ac3c1d

File tree

8 files changed

+10
-5
lines changed

8 files changed

+10
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 0.28.4-dev
2+
* **Breaking change** Change the default for `allow-tools` command line flag to false.
3+
14
## 0.28.3+3
25
* Fix code highlighting in Dart after string interpolation (#1946, #1948) by
36
updating the highlightjs dependency.

dartdoc_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
dartdoc:
22
linkToSource:
33
root: '.'
4-
uriTemplate: 'https://github.com/dart-lang/dartdoc/blob/v0.28.3+3/%f%#L%l%'
4+
uriTemplate: 'https://github.com/dart-lang/dartdoc/blob/v0.28.4-dev/%f%#L%l%'

lib/src/dartdoc_options.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1428,7 +1428,7 @@ class DartdocOptionContext extends DartdocOptionContextBase
14281428
/// given command line arguments.
14291429
Future<List<DartdocOption>> createDartdocOptions() async {
14301430
return <DartdocOption>[
1431-
new DartdocOptionArgOnly<bool>('allowTools', true,
1431+
new DartdocOptionArgOnly<bool>('allowTools', false,
14321432
help: 'Execute user-defined tools to fill in @tool directives.',
14331433
negatable: true),
14341434
new DartdocOptionArgFile<double>(

lib/src/version.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// Generated code. Do not modify.
2-
const packageVersion = '0.28.3+3';
2+
const packageVersion = '0.28.4-dev';

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: dartdoc
22
# Run `grind build` after updating.
3-
version: 0.28.3+3
3+
version: 0.28.4-dev
44
author: Dart Team <[email protected]>
55
description: A documentation generator for Dart.
66
homepage: https://github.com/dart-lang/dartdoc

test/dartdoc_integration_test.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ void main() {
112112
expect(
113113
() => subprocessLauncher.runStreamed(Platform.resolvedExecutable, [
114114
dartdocPath,
115+
'--allow-tools',
115116
'--input=${testPackageToolError.path}',
116117
'--output=${path.join(tempDir.absolute.path, 'test_package_tool_error')}'
117118
]),

test/dartdoc_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ void main() {
100100
});
101101

102102
test('errors generate errors even when warnings are off', () async {
103-
Dartdoc dartdoc = await buildDartdoc([], testPackageToolError, tempDir);
103+
Dartdoc dartdoc = await buildDartdoc(['--allow-tools'], testPackageToolError, tempDir);
104104
DartdocResults results = await dartdoc.generateDocsBase();
105105
PackageGraph p = results.packageGraph;
106106
Iterable<String> unresolvedToolErrors = p

test/src/utils.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ Future<PackageGraph> bootBasicPackage(
114114
sdkDir.path,
115115
'--exclude',
116116
excludeLibraries.join(','),
117+
'--allow-tools',
117118
] +
118119
additionalArguments))
119120
.buildPackageGraph();

0 commit comments

Comments
 (0)