-
Notifications
You must be signed in to change notification settings - Fork 626
Missing log() in SCSS #2577
Description
You call a function, log() in SCSS that isn't defined in your codebase. It seems that this code comes from a copy-paste from a source that you removed the copyright/author line from.
Your source code lists https://stackoverflow.com/questions/32376461/how-to-split-a-string-into-two-lists-of-numbers-in-sass, but you probably just linked to the question, not the answer. The answer it looks like you copied is https://stackoverflow.com/a/38526049/271351. It looks like they copied it from https://css-tricks.com/snippets/sass/str-replace-function/.
You have another block of code that is cited by a dead link: http://sassmeister.com/gist/1b4f2da5527830088e4d. It should probably be https://css-tricks.com/snippets/sass/str-replace-function/ (though that might be just someone copying the original code too). The original link states that this code is copyrighted: https://web.archive.org/web/20150915104516/http://sassmeister.com/gist/1b4f2da5527830088e4d
Finally, there is this block of code, which is also cited with a dead link. Further research indicates that this block of code came from https://web.archive.org/web/20150828035532/http://www.sassmeister.com/gist/9fa19d254864f33d4a80, which clearly states that this is a copyrighted piece of code.
So, if you are going to copy code, (apparently from Hugo Giraudel and/or Kitty Giraudel), you should probably at least make sure that you keep the header intact to give credit where credit is due and then adjust the code to not call functions that don't exist in your codebase.
See
| $_: log("Value for `to-number` should be a number or a string."); |
| $_: log("Invalid unit `#{$unit}`."); |