-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add specs for deprecated function names #1932
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
377 changes: 377 additions & 0 deletions
377
spec/directives/function/deprecated_name/unvendored.hrx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,377 @@ | ||
<===> options.yml | ||
:ignore_for: | ||
- libsass | ||
|
||
<===> | ||
================================================================================ | ||
<===> round/input.scss | ||
@function round() {@return a} | ||
b {c: round()} | ||
|
||
<===> round/output.css | ||
b { | ||
c: a; | ||
} | ||
|
||
<===> round/warning | ||
DEPRECATION WARNING on line 1, column 1 of input.scss: | ||
Naming a Sass function "round" is deprecated because it conflicts with the new | ||
CSS round() syntax. Either rename it or use the math.round() function. | ||
|
||
More info: https:/sass-lang.com/d/math-fn-name | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Already commented on dart-sass, but this is missing a slash after |
||
, | ||
1 | @function round() {@return a} | ||
| ^^^^^^^^^^^^^^^^^ | ||
' | ||
|
||
<===> | ||
================================================================================ | ||
<===> mod/input.scss | ||
@function mod() {@return a} | ||
b {c: mod()} | ||
|
||
<===> mod/output.css | ||
b { | ||
c: a; | ||
} | ||
|
||
<===> mod/warning | ||
DEPRECATION WARNING on line 1, column 1 of input.scss: | ||
Naming a Sass function "mod" is deprecated because it conflicts with the new | ||
CSS mod() syntax. Please rename it. | ||
|
||
More info: https:/sass-lang.com/d/math-fn-name | ||
, | ||
1 | @function mod() {@return a} | ||
| ^^^^^^^^^^^^^^^ | ||
' | ||
|
||
<===> | ||
================================================================================ | ||
<===> rem/input.scss | ||
@function rem() {@return a} | ||
b {c: rem()} | ||
|
||
<===> rem/output.css | ||
b { | ||
c: a; | ||
} | ||
|
||
<===> rem/warning | ||
DEPRECATION WARNING on line 1, column 1 of input.scss: | ||
Naming a Sass function "rem" is deprecated because it conflicts with the new | ||
CSS rem() syntax. Please rename it. | ||
|
||
More info: https:/sass-lang.com/d/math-fn-name | ||
, | ||
1 | @function rem() {@return a} | ||
| ^^^^^^^^^^^^^^^ | ||
' | ||
|
||
<===> | ||
================================================================================ | ||
<===> sin/input.scss | ||
@function sin() {@return a} | ||
b {c: sin()} | ||
|
||
<===> sin/output.css | ||
b { | ||
c: a; | ||
} | ||
|
||
<===> sin/warning | ||
DEPRECATION WARNING on line 1, column 1 of input.scss: | ||
Naming a Sass function "sin" is deprecated because it conflicts with the new | ||
CSS sin() syntax. Either rename it or use the math.sin() function. | ||
|
||
More info: https:/sass-lang.com/d/math-fn-name | ||
, | ||
1 | @function sin() {@return a} | ||
| ^^^^^^^^^^^^^^^ | ||
' | ||
|
||
<===> | ||
================================================================================ | ||
<===> cos/input.scss | ||
@function cos() {@return a} | ||
b {c: cos()} | ||
|
||
<===> cos/output.css | ||
b { | ||
c: a; | ||
} | ||
|
||
<===> cos/warning | ||
DEPRECATION WARNING on line 1, column 1 of input.scss: | ||
Naming a Sass function "cos" is deprecated because it conflicts with the new | ||
CSS cos() syntax. Either rename it or use the math.cos() function. | ||
|
||
More info: https:/sass-lang.com/d/math-fn-name | ||
, | ||
1 | @function cos() {@return a} | ||
| ^^^^^^^^^^^^^^^ | ||
' | ||
|
||
<===> | ||
================================================================================ | ||
<===> tan/input.scss | ||
@function tan() {@return a} | ||
b {c: tan()} | ||
|
||
<===> tan/output.css | ||
b { | ||
c: a; | ||
} | ||
|
||
<===> tan/warning | ||
DEPRECATION WARNING on line 1, column 1 of input.scss: | ||
Naming a Sass function "tan" is deprecated because it conflicts with the new | ||
CSS tan() syntax. Either rename it or use the math.tan() function. | ||
|
||
More info: https:/sass-lang.com/d/math-fn-name | ||
, | ||
1 | @function tan() {@return a} | ||
| ^^^^^^^^^^^^^^^ | ||
' | ||
|
||
<===> | ||
================================================================================ | ||
<===> asin/input.scss | ||
@function asin() {@return a} | ||
b {c: asin()} | ||
|
||
<===> asin/output.css | ||
b { | ||
c: a; | ||
} | ||
|
||
<===> asin/warning | ||
DEPRECATION WARNING on line 1, column 1 of input.scss: | ||
Naming a Sass function "asin" is deprecated because it conflicts with the new | ||
CSS asin() syntax. Either rename it or use the math.asin() function. | ||
|
||
More info: https:/sass-lang.com/d/math-fn-name | ||
, | ||
1 | @function asin() {@return a} | ||
| ^^^^^^^^^^^^^^^^ | ||
' | ||
|
||
<===> | ||
================================================================================ | ||
<===> acos/input.scss | ||
@function acos() {@return a} | ||
b {c: acos()} | ||
|
||
<===> acos/output.css | ||
b { | ||
c: a; | ||
} | ||
|
||
<===> acos/warning | ||
DEPRECATION WARNING on line 1, column 1 of input.scss: | ||
Naming a Sass function "acos" is deprecated because it conflicts with the new | ||
CSS acos() syntax. Either rename it or use the math.acos() function. | ||
|
||
More info: https:/sass-lang.com/d/math-fn-name | ||
, | ||
1 | @function acos() {@return a} | ||
| ^^^^^^^^^^^^^^^^ | ||
' | ||
|
||
<===> | ||
================================================================================ | ||
<===> atan/input.scss | ||
@function atan() {@return a} | ||
b {c: atan()} | ||
|
||
<===> atan/output.css | ||
b { | ||
c: a; | ||
} | ||
|
||
<===> atan/warning | ||
DEPRECATION WARNING on line 1, column 1 of input.scss: | ||
Naming a Sass function "atan" is deprecated because it conflicts with the new | ||
CSS atan() syntax. Either rename it or use the math.atan() function. | ||
|
||
More info: https:/sass-lang.com/d/math-fn-name | ||
, | ||
1 | @function atan() {@return a} | ||
| ^^^^^^^^^^^^^^^^ | ||
' | ||
|
||
<===> | ||
================================================================================ | ||
<===> atan2/input.scss | ||
@function atan2() {@return a} | ||
b {c: atan2()} | ||
|
||
<===> atan2/output.css | ||
b { | ||
c: a; | ||
} | ||
|
||
<===> atan2/warning | ||
DEPRECATION WARNING on line 1, column 1 of input.scss: | ||
Naming a Sass function "atan2" is deprecated because it conflicts with the new | ||
CSS atan2() syntax. Either rename it or use the math.atan2() function. | ||
|
||
More info: https:/sass-lang.com/d/math-fn-name | ||
, | ||
1 | @function atan2() {@return a} | ||
| ^^^^^^^^^^^^^^^^^ | ||
' | ||
|
||
<===> | ||
================================================================================ | ||
<===> pow/input.scss | ||
@function pow() {@return a} | ||
b {c: pow()} | ||
|
||
<===> pow/output.css | ||
b { | ||
c: a; | ||
} | ||
|
||
<===> pow/warning | ||
DEPRECATION WARNING on line 1, column 1 of input.scss: | ||
Naming a Sass function "pow" is deprecated because it conflicts with the new | ||
CSS pow() syntax. Either rename it or use the math.pow() function. | ||
|
||
More info: https:/sass-lang.com/d/math-fn-name | ||
, | ||
1 | @function pow() {@return a} | ||
| ^^^^^^^^^^^^^^^ | ||
' | ||
|
||
<===> | ||
================================================================================ | ||
<===> sqrt/input.scss | ||
@function sqrt() {@return a} | ||
b {c: sqrt()} | ||
|
||
<===> sqrt/output.css | ||
b { | ||
c: a; | ||
} | ||
|
||
<===> sqrt/warning | ||
DEPRECATION WARNING on line 1, column 1 of input.scss: | ||
Naming a Sass function "sqrt" is deprecated because it conflicts with the new | ||
CSS sqrt() syntax. Either rename it or use the math.sqrt() function. | ||
|
||
More info: https:/sass-lang.com/d/math-fn-name | ||
, | ||
1 | @function sqrt() {@return a} | ||
| ^^^^^^^^^^^^^^^^ | ||
' | ||
|
||
<===> | ||
================================================================================ | ||
<===> hypot/input.scss | ||
@function hypot() {@return a} | ||
b {c: hypot()} | ||
|
||
<===> hypot/output.css | ||
b { | ||
c: a; | ||
} | ||
|
||
<===> hypot/warning | ||
DEPRECATION WARNING on line 1, column 1 of input.scss: | ||
Naming a Sass function "hypot" is deprecated because it conflicts with the new | ||
CSS hypot() syntax. Either rename it or use the math.hypot() function. | ||
|
||
More info: https:/sass-lang.com/d/math-fn-name | ||
, | ||
1 | @function hypot() {@return a} | ||
| ^^^^^^^^^^^^^^^^^ | ||
' | ||
|
||
<===> | ||
================================================================================ | ||
<===> log/input.scss | ||
@function log() {@return a} | ||
b {c: log()} | ||
|
||
<===> log/output.css | ||
b { | ||
c: a; | ||
} | ||
|
||
<===> log/warning | ||
DEPRECATION WARNING on line 1, column 1 of input.scss: | ||
Naming a Sass function "log" is deprecated because it conflicts with the new | ||
CSS log() syntax. Either rename it or use the math.log() function. | ||
|
||
More info: https:/sass-lang.com/d/math-fn-name | ||
, | ||
1 | @function log() {@return a} | ||
| ^^^^^^^^^^^^^^^ | ||
' | ||
|
||
<===> | ||
================================================================================ | ||
<===> exp/input.scss | ||
@function exp() {@return a} | ||
b {c: exp()} | ||
|
||
<===> exp/output.css | ||
b { | ||
c: a; | ||
} | ||
|
||
<===> exp/warning | ||
DEPRECATION WARNING on line 1, column 1 of input.scss: | ||
Naming a Sass function "exp" is deprecated because it conflicts with the new | ||
CSS exp() syntax. Please rename it. | ||
|
||
More info: https:/sass-lang.com/d/math-fn-name | ||
, | ||
1 | @function exp() {@return a} | ||
| ^^^^^^^^^^^^^^^ | ||
' | ||
|
||
<===> | ||
================================================================================ | ||
<===> abs/input.scss | ||
@function abs() {@return a} | ||
b {c: abs()} | ||
|
||
<===> abs/output.css | ||
b { | ||
c: a; | ||
} | ||
|
||
<===> abs/warning | ||
DEPRECATION WARNING on line 1, column 1 of input.scss: | ||
Naming a Sass function "abs" is deprecated because it conflicts with the new | ||
CSS abs() syntax. Either rename it or use the math.abs() function. | ||
|
||
More info: https:/sass-lang.com/d/math-fn-name | ||
, | ||
1 | @function abs() {@return a} | ||
| ^^^^^^^^^^^^^^^ | ||
' | ||
|
||
<===> | ||
================================================================================ | ||
<===> sign/input.scss | ||
@function sign() {@return a} | ||
b {c: sign()} | ||
|
||
<===> sign/output.css | ||
b { | ||
c: a; | ||
} | ||
|
||
<===> sign/warning | ||
DEPRECATION WARNING on line 1, column 1 of input.scss: | ||
Naming a Sass function "sign" is deprecated because it conflicts with the new | ||
CSS sign() syntax. Please rename it. | ||
|
||
More info: https:/sass-lang.com/d/math-fn-name | ||
, | ||
1 | @function sign() {@return a} | ||
| ^^^^^^^^^^^^^^^^ | ||
' |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this case is considered too exceptional, but is it worth adding tests for functions which are renamed to these newly reserved functions?
For example:
Which today will compile without error, but in the future will fail (as it currently does for a similar setup with e.g.
calc
).I had thought it was easier to rename identifiers for some reason -- i.e. without the use of
@forward
, but I can't think of any concrete way off the top of my head.