[bug]: Stacked CLI #47 appears to have broken line length formatting
Describe the bug
After updating to stacked_cli 1.13.1, line_length variable in stacked.json appears to be ignored. Files auto-generated by Stacked are being formatted with a default line length of 80.
It appears that the PR #46 and merge #47 in the stacked_cli project have undone this behaviour that was once working.
What operating system do you use?
macOS
Information about the installed tooling
[✓] Flutter (Channel stable, 3.24.0, on macOS 14.6.1 23G93 darwin-arm64, locale en-GB)
• Flutter version 3.24.0 on channel stable at /Users/cord.schneider/Development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 80c2e84975 (3 weeks ago), 2024-07-30 23:06:49 +0700
• Engine revision b8800d88be
• Dart version 3.5.0
• DevTools version 2.37.2
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
• Android SDK at /Users/cord.schneider/Library/Android/sdk
• Platform android-35, build-tools 32.1.0-rc1
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15F31d
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2024.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)
[✓] VS Code (version 1.92.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.94.0
[✓] Connected device (4 available)
• slothlet's iPhone (mobile) • 00008130-000968160C38001C • ios • iOS 17.6.1 21G93
• macOS (desktop) • macos • darwin-arm64 • macOS 14.6.1 23G93 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 14.6.1 23G93 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 127.0.6533.120
[✓] Network resources
• All expected network resources are available.
• No issues found!
Steps to reproduce the issue
- Create a stacked project using pre-1.13.1 stacked_cli
- Set
line_lengthto150in stacked.json - Run
stacked create view layoutOne --template=emptyin an existing project - Review line length of generated files
- Update to 1.13.1 stacked_cli
- Run
stacked create view LayoutTwo --template=emptyin an existing project - Review line length of generated files
Expected behavior
Expected the line length defined in stacked.json to be honoured and all generated files created with stacked_cli 1.13.1 to be correct.
Screenshots
No response
Additional Context
No response
Note that the hotlinks to #46 and #47 are incorrect as Github has referenced theme for stacked rather than stacked_cli. Unfortunately it is not possible to create an issue in the stacked_cli project.
The links that you actually want are:
https://github.com/Stacked-Org/cli/pull/46 https://github.com/Stacked-Org/cli/pull/47
Also note, this appears to be happening for stacked create view commands. I've run stacked generate and it behaves as expected.
Thanks Cord. Will add to the list of fixes
I think we can pass in the line length or set it in the config, we probably didn't update the config.