You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In atom-beautify/src/beautifiers/rustfmt.coffee the rustfmt version is checked to be 0.5.0 or later with the following regexp:
if /^0.(?:[0-4].[0-9])(?!-nightly)/.test(stdout.trim())
This looks incorrect, as it only matches a single digit for each version component. But beyond that the behaviour seems a bit strange to me, though I am not a coffeescript expert. If you happen to build rustfmt from the master branch at version 0.2.9, then atom-beautify will happily use that beautifier to format your Rust code. If you build rustfmt from the master branch at 0.2.10 or later, then atom-beautify will complain about the rustfmt version.
Note: The intended general usage of rustfmt might be to build it from the syntex branch, where the version is 0.9.0 at the time of writing, but the regexp still looks incorrect.
Steps to Reproduce
Build rustfmt from the master branch at tag 0.2.9 and configure atom-beautify to use it.
Expected behaviour: atom-beautify complains about the version of rustfmt.
Actual behaviour: atom-beautify happily reformats the Rust code.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. If this is still an issue, please add a comment. It will be closed if no further activity occurs. Thank you for your contributions.
In atom-beautify/src/beautifiers/rustfmt.coffee the rustfmt version is checked to be 0.5.0 or later with the following regexp:
if /^0.(?:[0-4].[0-9])(?!-nightly)/.test(stdout.trim())
This looks incorrect, as it only matches a single digit for each version component. But beyond that the behaviour seems a bit strange to me, though I am not a coffeescript expert. If you happen to build rustfmt from the master branch at version 0.2.9, then atom-beautify will happily use that beautifier to format your Rust code. If you build rustfmt from the master branch at 0.2.10 or later, then atom-beautify will complain about the rustfmt version.
Note: The intended general usage of rustfmt might be to build it from the syntex branch, where the version is 0.9.0 at the time of writing, but the regexp still looks incorrect.
Steps to Reproduce
Build rustfmt from the master branch at tag 0.2.9 and configure atom-beautify to use it.
Expected behaviour: atom-beautify complains about the version of rustfmt.
Actual behaviour: atom-beautify happily reformats the Rust code.
The text was updated successfully, but these errors were encountered: