Skip to content

Commit c4b8932

Browse files
authored
Merge pull request #875 from sass/fix-analysis
Fix new analysis hints
2 parents bf67080 + 7b0faec commit c4b8932

Some content is hidden

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

91 files changed

+278
-246
lines changed

lib/sass.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ String compileString(String source,
185185
Iterable<Callable> functions,
186186
OutputStyle style,
187187
Importer importer,
188-
url,
188+
Object url,
189189
void sourceMap(SingleMapping map),
190190
bool charset = true,
191191
@Deprecated("Use syntax instead.") bool indented = false}) {
@@ -250,7 +250,7 @@ Future<String> compileStringAsync(String source,
250250
Iterable<AsyncCallable> functions,
251251
OutputStyle style,
252252
AsyncImporter importer,
253-
url,
253+
Object url,
254254
void sourceMap(SingleMapping map),
255255
bool charset = true,
256256
@Deprecated("Use syntax instead.") bool indented = false}) async {

lib/src/ast/css/media_query.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ class CssMediaQuery {
3232
/// If passed, [url] is the name of the file from which [contents] comes.
3333
///
3434
/// Throws a [SassFormatException] if parsing fails.
35-
static List<CssMediaQuery> parseList(String contents, {url, Logger logger}) =>
35+
static List<CssMediaQuery> parseList(String contents,
36+
{Object url, Logger logger}) =>
3637
MediaQueryParser(contents, url: url, logger: logger).parse();
3738

3839
/// Creates a media query specifies a type and, optionally, features.
@@ -139,7 +140,7 @@ class CssMediaQuery {
139140
features: features));
140141
}
141142

142-
bool operator ==(other) =>
143+
bool operator ==(Object other) =>
143144
other is CssMediaQuery &&
144145
other.modifier == modifier &&
145146
other.type == type &&

lib/src/ast/css/stylesheet.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class CssStylesheet extends CssParentNode {
2626
: children = UnmodifiableListView(children);
2727

2828
/// Creates an empty stylesheet with the given source URL.
29-
CssStylesheet.empty({url})
29+
CssStylesheet.empty({Object url})
3030
: children = const [],
3131
span = SourceFile.decoded(const [], url: url).span(0, 0);
3232

lib/src/ast/sass/argument_declaration.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ class ArgumentDeclaration implements SassNode {
5353
/// If passed, [url] is the name of the file from which [contents] comes.
5454
///
5555
/// Throws a [SassFormatException] if parsing fails.
56-
factory ArgumentDeclaration.parse(String contents, {url, Logger logger}) =>
56+
factory ArgumentDeclaration.parse(String contents,
57+
{Object url, Logger logger}) =>
5758
ScssParser("($contents)", url: url, logger: logger)
5859
.parseArgumentDeclaration();
5960

lib/src/ast/sass/at_root_query.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class AtRootQuery {
5555
/// If passed, [url] is the name of the file from which [contents] comes.
5656
///
5757
/// Throws a [SassFormatException] if parsing fails.
58-
factory AtRootQuery.parse(String contents, {url, Logger logger}) =>
58+
factory AtRootQuery.parse(String contents, {Object url, Logger logger}) =>
5959
AtRootQueryParser(contents, url: url, logger: logger).parse();
6060

6161
/// Returns whether [this] excludes [node].

lib/src/ast/sass/expression.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ abstract class Expression implements SassNode {
1717
/// If passed, [url] is the name of the file from which [contents] comes.
1818
///
1919
/// Throws a [SassFormatException] if parsing fails.
20-
factory Expression.parse(String contents, {url, Logger logger}) =>
20+
factory Expression.parse(String contents, {Object url, Logger logger}) =>
2121
ScssParser(contents, url: url, logger: logger).parseExpression();
2222
}

lib/src/ast/sass/statement/stylesheet.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class Stylesheet extends ParentStatement {
5858
///
5959
/// Throws a [SassFormatException] if parsing fails.
6060
factory Stylesheet.parse(String contents, Syntax syntax,
61-
{url, Logger logger}) {
61+
{Object url, Logger logger}) {
6262
switch (syntax) {
6363
case Syntax.sass:
6464
return Stylesheet.parseSass(contents, url: url, logger: logger);
@@ -76,23 +76,23 @@ class Stylesheet extends ParentStatement {
7676
/// If passed, [url] is the name of the file from which [contents] comes.
7777
///
7878
/// Throws a [SassFormatException] if parsing fails.
79-
factory Stylesheet.parseSass(String contents, {url, Logger logger}) =>
79+
factory Stylesheet.parseSass(String contents, {Object url, Logger logger}) =>
8080
SassParser(contents, url: url, logger: logger).parse();
8181

8282
/// Parses an SCSS stylesheet from [contents].
8383
///
8484
/// If passed, [url] is the name of the file from which [contents] comes.
8585
///
8686
/// Throws a [SassFormatException] if parsing fails.
87-
factory Stylesheet.parseScss(String contents, {url, Logger logger}) =>
87+
factory Stylesheet.parseScss(String contents, {Object url, Logger logger}) =>
8888
ScssParser(contents, url: url, logger: logger).parse();
8989

9090
/// Parses a plain CSS stylesheet from [contents].
9191
///
9292
/// If passed, [url] is the name of the file from which [contents] comes.
9393
///
9494
/// Throws a [SassFormatException] if parsing fails.
95-
factory Stylesheet.parseCss(String contents, {url, Logger logger}) =>
95+
factory Stylesheet.parseCss(String contents, {Object url, Logger logger}) =>
9696
CssParser(contents, url: url, logger: logger).parse();
9797

9898
T accept<T>(StatementVisitor<T> visitor) => visitor.visitStylesheet(this);

lib/src/ast/sass/statement/use_rule.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class UseRule implements Statement {
3838
/// If passed, [url] is the name of the file from which [contents] comes.
3939
///
4040
/// Throws a [SassFormatException] if parsing fails.
41-
factory UseRule.parse(String contents, {url, Logger logger}) =>
41+
factory UseRule.parse(String contents, {Object url, Logger logger}) =>
4242
ScssParser(contents, url: url, logger: logger).parseUseRule();
4343

4444
T accept<T>(StatementVisitor<T> visitor) => visitor.visitUseRule(this);

lib/src/ast/sass/statement/variable_declaration.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ class VariableDeclaration implements Statement {
6767
/// If passed, [url] is the name of the file from which [contents] comes.
6868
///
6969
/// Throws a [SassFormatException] if parsing fails.
70-
factory VariableDeclaration.parse(String contents, {url, Logger logger}) =>
70+
factory VariableDeclaration.parse(String contents,
71+
{Object url, Logger logger}) =>
7172
ScssParser(contents, url: url, logger: logger).parseVariableDeclaration();
7273

7374
T accept<T>(StatementVisitor<T> visitor) =>

lib/src/ast/selector/attribute.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class AttributeSelector extends SimpleSelector {
5252
T accept<T>(SelectorVisitor<T> visitor) =>
5353
visitor.visitAttributeSelector(this);
5454

55-
bool operator ==(other) =>
55+
bool operator ==(Object other) =>
5656
other is AttributeSelector &&
5757
other.name == name &&
5858
other.op == op &&

0 commit comments

Comments
 (0)