Comments (2)
I see the issue for these two lines, because the overall linesize exceeds the defined value of 120 chars. Splitting long lines is something done outside of the Arbori program. I cannot say why there is not split for the first line and the splitting of the second line occurs a bit late. Anyway, we can influence the behaviour only indirectly. By changing the max. line size or adding line breaks when we assume (somehow) that the line will be too long. That's probably doable using the same approach as for #33.
l_some_long_named_variable_rec.some_primary_item_id := p_input_obj.items(i).some_nested_element_array(j).some_primary_item_id;
l_some_long_named_variable_rec.some_other_key_element := get_some_other_key_element(p_input_obj.items(i).some_nested_element_array(
However, the the behaviour for the following line is completely OK IMO.
l_some_long_named_variable_tab(j) := l_some_long_named_variable_rec;
I don't think it's a good idea to add a line break regardless of the line size after the :=
.
from plsql-formatter-settings.
After closing the #33 the result looks like this:
declare
function transform_cancel_rec (
p_input_obj some_obj_type
) return return_rec is
l_return_rec return_rec;
l_some_rec some_rec_type;
l_some_tab some_tab_type;
l_some_long_named_variable_rec some_record_type;
l_some_long_named_variable_tab some_table_type;
begin
l_return_rec.some_primary_id := p_input_obj.primary_id;
for i in 1..p_input_obj.items.count loop
l_some_long_named_variable_tab := some_table_type();
for j in 1..p_input_obj.items(i).some_nested_element_array.count loop
l_some_long_named_variable_rec.some_primary_item_id := p_input_obj.items(i).some_nested_element_array(
j).some_primary_item_id;
l_some_long_named_variable_rec.some_other_key_element :=
get_some_other_key_element(
p_input_obj.items(i).some_nested_element_array(j).some_sun_element_id
);
l_some_long_named_variable_tab.extend();
l_some_long_named_variable_tab(j) := l_some_long_named_variable_rec;
end loop;
l_some_rec.items := l_some_long_named_variable_tab;
l_some_tab.extend();
l_some_tab(i) := l_some_rec;
end loop;
l_return_rec.items := l_some_tab;
return l_return_rec;
end;
begin
null;
end;
/
This is better. Only
l_some_long_named_variable_rec.some_primary_item_id := p_input_obj.items(i).some_nested_element_array(
j).some_primary_item_id;
should be splitted. The estimation for the line size does not include the left part of the assignment statement. Adding this should solve the problem.
from plsql-formatter-settings.
Related Issues (20)
- formatting large files with repetitive statements, i.e. insert HOT 3
- noformat not working HOT 6
- Superb Script HOT 2
- Package constant formatting HOT 1
- Function header formatting: return deterministic HOT 1
- Support SQLDev 23.1.0 HOT 1
- Add - Formatierung "CASE WHEN" in SELECT statemen HOT 4
- Newlines being inserted into strings HOT 4
- Concatenation Bars being split apart invalidating strings HOT 2
- compiler flag concatenated to same line as end statement HOT 2
- Support SQLcl 23.3
- Do not reset Arbori program when importing trivadis_advanced_format.xml
- Unwanted line break after `whenever oserror` breaks code
- Wrong indentation in subqueries of with_clause in insert statements
- Unwanted line break before `on conversion error` in subquery
- spaces removed in grant statement
- Patching SQL Developer breaks Script Output tab feedback of direct SQL statement execution HOT 8
- Support SQLcl 23.4.0
- Can't export data after patch HOT 1
- Connection window is empty and not able to create any new database connection HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plsql-formatter-settings.