-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Output is truncated on MacOS (without --ci) #56
Comments
Interestingly, if i try it with the following config module.exports = {
rules: {
attr: {
width: true,
height: true
}
}
}; it just crashes without any output $ ./node_modules/.bin/svglint --debug src/assets/icons/*.svg
$ echo $?
1 But if i try it with this module.exports = {
rules: {
attr: {
}
}
}; It runs well $ ./node_modules/.bin/svglint src/assets/icons/*.svg
-------------------------------------------------- Summary --------------------------------------------------
✓ 108 valid files.
$ echo $?
0 |
Regarding the original issue descriptionThat SVGLint configuration is written using ESModule syntax (i.e. using That said, this could probably be better explained in the README (Pull Request is welcome 🙂). Regarding the second commentI'm not able to reproduce the crash-without-input based on just the configuration you provided (see below). Are you able to share your project your setting this up with? If not, perhaps a minimum project that reproduces it? Also, could you share the OS you're trying this on. The setup I tested with: // testing/.svglintrc.js
module.exports = {
rules: {
attr: {
width: true,
height: true
}
}
}; // testing/a.svg
<svg role="img" viewBox="0 0 24 24">
<g id="foo">
<path d="bar"></path>
</g>
<g></g>
<circle></circle>
</svg> // testing/package.json
{
"name": "testing",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"lint": "svglint --debug a.svg"
},
"author": "",
"license": "ISC",
"dependencies": {
"svglint": "^2.1.0"
}
} The run
|
Thanks. I think i figured out the issue with the silent exit (with exit code 1) -- seems like it didn't like the input files i provided (i'm assuming one of them is "bad" in some way and causes In the meantime, how should I structure my config such that it checks for |
The // testing/.svglintrc.js// testing/.svglintrc.js
module.exports = {
rules: {
attr: {
width: true,
height: true,
"rule::selector": "svg"
}
}
};
At this point I'm going to assume the "truncated output" and "silent failure" are related problems for simplicity, we'll find out if that's the case down the line 🙂 I have now tested this on
I tested this as well, the terminal width doesn't influence whether or not the output is truncated for me, instead it looks something like:
On the other hand the terminal height does seem to have an effect. With the above setup, if I make the terminal window tall enough there's no truncation. As I make the window shorter the output gets truncated from the top (which matches your findings so far). Unfortunately, I only have limited access to a Mac so it might be hard for me to work on this. I'd encourage you to look into this yourself if you have time. In the meantime I guess you'd have to default to using the |
For what it's worth, the CLI rendering engine has given problems earlier and is likely due for a proper rewrite. I believe that the update logic I implemented back in the day (which is responsible for repeatedly rendering the GUI when While I can't comment on the issue reported here, it might be worthwhile to just redo the GUI implementation entirely. |
Thanks - this worked. I swear I had tried this, but I suspect it had gotten mixed up with the truncated output issue and I didn't see the results one would expect. Cheers! Running with |
Merge in SUN/veera-components from refactor-EBS-459-storybook-structure to master Squashed commit of the following: commit e973ef75cb5aff152a0e31993e6165c74642b009 Author: Aleksandr Beliaev <aleksandr.beliaev@nortal.com> Date: Sun Jan 15 20:35:47 2023 +0200 format(storybook): minor formatting commit 2ad02af4a5cf80b13b8f88e7766cd2f801f58ae6 Author: Aleksandr Beliaev <aleksandr.beliaev@nortal.com> Date: Sun Jan 15 20:33:42 2023 +0200 refactor(icons): removed hardcoded color from user icon (to be added in an app itself) commit e8fd48a7c4bdc43b61c5f2b73a7c5ab060c00d81 Author: Aleksandr Beliaev <aleksandr.beliaev@nortal.com> Date: Sun Jan 15 20:30:36 2023 +0200 refactor(icons): removed hardcoded color from sort icon (to be added in an app itself) commit 5708ff702196b79c2f9a4334693be698b9bfaa47 Author: Aleksandr Beliaev <aleksandr.beliaev@nortal.com> Date: Sun Jan 15 20:28:03 2023 +0200 refactor(icons): removed hardcoded color from happy-face and sad-face icons (to be added in an app itself) commit 2fab7fa6c12e953a932fae1b7fcd48bf6656c499 Author: Aleksandr Beliaev <aleksandr.beliaev@nortal.com> Date: Sun Jan 15 20:26:09 2023 +0200 refactor(icons): removed an unnecessary fill attribute from info icon commit 7c6fb5c9f39442eef160081b71e9dd699d5f3fc1 Author: Aleksandr Beliaev <aleksandr.beliaev@nortal.com> Date: Sun Jan 15 20:21:34 2023 +0200 refactor(icons): simplified path in error-outline icon commit 0d57fda39179c49aa46097c7f1324d8a05e37300 Author: Aleksandr Beliaev <aleksandr.beliaev@nortal.com> Date: Sun Jan 15 20:15:49 2023 +0200 refactor(icons): removed an unused attribute from email icon commit 1fb3ce3f6d52a3cb323d7dee24a701bdf0f1ffaf Author: Aleksandr Beliaev <aleksandr.beliaev@nortal.com> Date: Sun Jan 15 20:11:36 2023 +0200 refactor(icons): removed unnecessary group tags from all SVG icons commit c98e53f9d71145884b52836016e3f6e4e58e1d77 Author: Aleksandr Beliaev <aleksandr.beliaev@nortal.com> Date: Sun Jan 15 20:06:30 2023 +0200 feat(icons): mark as a linting error presence of a g tag inside SVG markup with only one child see simple-icons/svglint#56 commit 909737f29f983014167267986fdd1cc4a9cfd979 Author: Aleksandr Beliaev <aleksandr.beliaev@nortal.com> Date: Sun Jan 15 20:03:14 2023 +0200 feat(icons): do not truncate errors list when linting icons see simple-icons/svglint#56 commit eaa4bbf72bfacf7ea6cddf03fc55d1f5ef977461 Author: Aleksandr Beliaev <aleksandr.beliaev@nortal.com> Date: Sun Jan 15 20:01:59 2023 +0200 refactor(icons): simplified path in check-circle-outline icon commit b100f0e59272b738d915e52276a4c6b45b0fa848 Author: Aleksandr Beliaev <aleksandr.beliaev@nortal.com> Date: Sun Jan 15 20:01:14 2023 +0200 refactor(icons): removed hardcoded color and opacity from arrow-up-alt icon (to be added in an app itself) commit b3093c5d80c88d16ca75a5ee2ff450efea5cadef Author: Aleksandr Beliaev <aleksandr.beliaev@nortal.com> Date: Sun Jan 15 19:56:20 2023 +0200 feat(icons): added more rules to SVGLint config commit 75364d48869d08799d1f52eb9c87719838887aea Author: Aleksandr Beliaev <aleksandr.beliaev@nortal.com> Date: Sun Jan 15 19:55:38 2023 +0200 refactor(icons): removed hardcoded color from edit icon (to be added in an app itself) commit 8e3556503caf41ff135f610f73efd3bf47d0df01 Author: Aleksandr Beliaev <aleksandr.beliaev@nortal.com> Date: Sun Jan 15 19:55:11 2023 +0200 refactor(icons): removed hardcoded color and opacity from arrow-down-alt icon (to be added in an app itself) commit 841649248b51c3bcdc3943b85d147ddeea78090d Author: Aleksandr Beliaev <aleksandr.beliaev@nortal.com> Date: Sun Jan 15 19:10:07 2023 +0200 refactor(icons): removed hardcoded color from arrow-up icon (to be added in an app itself) commit 446e6bf9503512c044438fbe2187de20599a1a69 Author: Aleksandr Beliaev <aleksandr.beliaev@nortal.com> Date: Sun Jan 15 18:52:27 2023 +0200 refactor(icons): removed hardcoded color from arrow-down icon (to be added in an app itself) commit f69e285a06847c6faec28ad7d5a5dfd73161e451 Author: Aleksandr Beliaev <aleksandr.beliaev@nortal.com> Date: Sun Jan 15 18:51:53 2023 +0200 refactor(icons): removed hardcoded color from action icon (to be added in an app itself) commit f2c3e8b87bb558d13a45a086923d13029b36e6c6 Author: Aleksandr Beliaev <aleksandr.beliaev@nortal.com> Date: Sun Jan 15 18:43:52 2023 +0200 feat(icons): added an SVG linter and lint:svg command commit 3229f0ad8d6ddf9456684f11eba83337615ff808 Author: Aleksandr Beliaev <aleksandr.beliaev@nortal.com> Date: Sun Jan 15 18:12:54 2023 +0200 feat(storybook): expand height of All icons story when viewed in Docs tab ... and 5 more commits
Update: see further down for details on bug (output truncated on macos)
Original message:
Attempting to set this linter up for my project but running into the following error
I've got a
.svglintrc.js
file with the following:Using node 14.18.1 on MacOS 12.1
Am I using it wrong?
The text was updated successfully, but these errors were encountered: