Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

Commit

Permalink
repo cleanup (#654)
Browse files Browse the repository at this point in the history
  • Loading branch information
devoncarew authored Feb 19, 2020
1 parent 698d812 commit 02335f1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
13 changes: 0 additions & 13 deletions templates/analysis_options_exclude_build.yaml

This file was deleted.

8 changes: 1 addition & 7 deletions test/validate_templates.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ final List<RegExp> _pubspecOrderRegexps =
final String _expectedGitIgnore = _getMetaTemplateFile('.gitignore');
final String _expectedAnalysisOptions =
_getMetaTemplateFile('templates/analysis_options.yaml');
final String _expectedExcludeBuildAnalysisOptions =
_getMetaTemplateFile('templates/analysis_options_exclude_build.yaml');
final String _expectedAngularAnalysisOptions = [
_expectedAnalysisOptions.split('\n').take(12),
' exclude: [build/**]',
Expand Down Expand Up @@ -93,18 +91,14 @@ void _testGenerator(stagehand.Generator generator, Directory tempDir) {
var pubspecContent = yaml.loadYaml(pubspecContentString) as yaml.YamlMap;
final usesAngular =
pubspecContent['dependencies']?.containsKey('angular') ?? false;
final usesFlutter =
pubspecContent['dependencies']?.containsKey('flutter_web') ?? false;

var analysisOptionsPath = path.join(tempDir.path, 'analysis_options.yaml');
var analysisOptionsFile = File(analysisOptionsPath);
expect(
analysisOptionsFile.readAsStringSync(),
usesAngular
? _expectedAngularAnalysisOptions
: usesFlutter
? _expectedExcludeBuildAnalysisOptions
: _expectedAnalysisOptions,
: _expectedAnalysisOptions,
reason: 'All analysis_options.yaml files should be identical.');

if (!pubspecFile.existsSync()) {
Expand Down

0 comments on commit 02335f1

Please sign in to comment.