# Robocop and Robotidy line-too-long

**URL:** <https://forum.robotframework.org/t/robocop-and-robotidy-line-too-long/8079>\
**Category:** Tools\
**Created:** [14 November 2024 10:38 UTC](https://forum.robotframework.org/t/robocop-and-robotidy-line-too-long/8079 "2024-11-14T10:38:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rasjani](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@rasjani](https://forum.robotframework.org/u/rasjani)\
**Post date:** [14 November 2024 10:38 UTC](https://forum.robotframework.org/t/robocop-and-robotidy-line-too-long/8079/1 "2024-11-14T10:38:43Z")

</div>

I have pyproject.toml that set’s up both robotidy and robocop to use line length as 130 characters. However, tidy does not change/split arguments for test template which leads robocop to complain that the line is too long.

Is this because

a) robot doesnt allow template arguments to be split into multiple lines ?  
c) tidy doesn’t know how to split the arguments ?

---

<div class="post-metadata">

**Author:** ![CharlieScene](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/charliescene/32/3484_2.png) [@CharlieScene](https://forum.robotframework.org/u/CharlieScene)\
**Post date:** [14 November 2024 17:53 UTC](https://forum.robotframework.org/t/robocop-and-robotidy-line-too-long/8079/2 "2024-11-14T17:53:25Z")

</div>

Hi,

I see the doc mentions this:

`SplitTooLongLine` does not support splitting all Robot Framework types. Currently it will only work on too long keyword calls, variables and selected settings (tags and arguments). Missing types will be covered in the future updates.

However there’s also these parameters maybe:  
split\_on\_every\_arg  
split\_on\_every\_setting\_arg

Hope that helps.  
Regards  
Charlie

---

<div class="post-metadata">

**Author:** ![james598keen](https://avatars.discourse-cdn.com/v4/letter/j/bbce88/32.png) [@james598keen](https://forum.robotframework.org/u/james598keen)\
**Post date:** [16 December 2024 04:36 UTC](https://forum.robotframework.org/t/robocop-and-robotidy-line-too-long/8079/3 "2024-12-16T04:36:02Z")

</div>

> [@rasjani](#):
>
> I have pyproject.toml that set’s up both robotidy and robocop to use line length as 130 characters. However, tidy does not change/split arguments for test template which leads robocop to complain that the line is too long.
> 
> Is this because
> 
> a) robot doesnt allow template arguments to be split into multiple lines ?  
> c) tidy doesn’t know how to split the arguments ?

Hello @rasjani,  
The issue is likely due to **Robotidy’s configuration**. By default, Robotidy’s `SplitTooLongLine` transformer does not split template arguments into multiple lines. You can change this behavior by setting the `split_on_every_arg` flag to `True`.

Here’s how you can update your `pyproject.toml`: [medicarecard](https://www.imedicarecard.com)

toml

```python
[tool.robotidy]
line_length = 130
transform = ["SplitTooLongLine"]
configure = ["SplitTooLongLine:split_on_every_arg=True"]

```

This should allow Robotidy to split template arguments across multiple lines, resolving the Robocop complaint.

Best Regards,  
James Keen
