Description
Right now the workflows that check dart projects (Flutter package, dart package, etc) explicitly passes a --line-length to the dart format command.
Since dart 3.7 the line length can be configure in the analysis_options.
By explicitly passing that flag, the package configuration will always be overridden, cause redundancies in projects that has a custom line limit.
I suggest that we remove the default of that field in the action, and only explicitly pass the flag if the user informed a value for it.
This should not cause any breaking changes because when a line-length flag is omitted, the default is 80 which is already what we have configured in the actions.
If we want to be super backward compatibility with older darts, we can also add a checking on the dart version and if it is lower than 3.7, the flag continues to be explicitly added
Requirements
Additional Context
No response
Description
Right now the workflows that check dart projects (Flutter package, dart package, etc) explicitly passes a
--line-lengthto thedart formatcommand.Since dart
3.7the line length can be configure in the analysis_options.By explicitly passing that flag, the package configuration will always be overridden, cause redundancies in projects that has a custom line limit.
I suggest that we remove the default of that field in the action, and only explicitly pass the flag if the user informed a value for it.
This should not cause any breaking changes because when a line-length flag is omitted, the default is 80 which is already what we have configured in the actions.
If we want to be super backward compatibility with older darts, we can also add a checking on the dart version and if it is lower than 3.7, the flag continues to be explicitly added
Requirements
line-lengthfield in the actions will only be added to the command when the user pass something in that field.Additional Context
No response