Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1a015e2

Browse files
committed
Aligned naming conventions with contributing guide.
Changed `utplsql_style_check.sql` to enforce naming conventions on build and when running: `develop/install.sh`
1 parent 8264e12 commit 1a015e2

186 files changed

Lines changed: 635 additions & 624 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis/install.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ grant create any procedure, drop any procedure, execute any procedure to $UT3_OW
2121
2222
conn $UT3_OWNER/$UT3_OWNER_PASSWORD@//$CONNECTION_STR
2323
@../development/utplsql_style_check.sql
24-
exit
2524
SQL
2625

2726
#Create additional users

development/utplsql_style_check.sql

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
11
alter session set plscope_settings= 'identifiers:all';
22
set linesize 300
3+
set pagesize 10000
34

45
--install or comple all code here
56
exec dbms_utility.compile_schema(USER,compile_all => TRUE,reuse_settings => FALSE);
6-
7+
set echo off
8+
set feedback off
79

810
var errcnt number
911

1012
column errcnt_a noprint new_value errcnt_a
1113
column errcnt_l noprint new_value errcnt_l
1214
column errcnt_c noprint new_value errcnt_c
1315

14-
--find parameters that donot begin with A_
15-
prompt parameters should start with A_
16+
column NAME FORMAT A30
17+
column TYPE FORMAT A18
18+
column OBJECT_NAME FORMAT A30
19+
column OBJECT_TYPE FORMAT A18
20+
column USAGE FORMAT A16
21+
column LINE FORMAT 99999
22+
column COL FORMAT 9999
23+
24+
PROMPT parameters that are not prefixed with "a_"
1625
select name, type, object_name, object_type, usage, line, col, count(*) over() errcnt_a
1726
from user_identifiers
1827
where type like 'FORMAL%' and usage = 'DECLARATION'
@@ -21,8 +30,9 @@ select name, type, object_name, object_type, usage, line, col, count(*) over() e
2130
order by object_name, object_type, line, col
2231
;
2332

24-
prompt variables should start with L_
25-
--variables start with l_ or g_
33+
PROMPT
34+
PROMPT
35+
PROMPT variables that are not prefixed with "l_"
2636
select i.name, i.type, i.object_name, i.object_type, i.usage, i.line, i.col, count(*) over() errcnt_l
2737
from user_identifiers i
2838
join user_identifiers p
@@ -33,11 +43,13 @@ select i.name, i.type, i.object_name, i.object_type, i.usage, i.line, i.col, cou
3343
and (i.name not like 'L#_%' escape '#' and p.type in ('PROCEDURE','FUNCTION','ITERATOR')
3444
or i.name not like 'G#_%' escape '#' and p.type not in ('PROCEDURE','FUNCTION','ITERATOR'))
3545
and p.type != 'RECORD'
36-
order by object_name, object_type, line, col;
46+
order by object_name, object_type, line, col
3747
;
3848

39-
--constants start with c_ or gc_
40-
prompt constants should start with C_
49+
PROMPT
50+
PROMPT
51+
PROMPT constants that are not prefixed with with "c_"
52+
PROMPT global constants that are not prefixed with "gc_"
4153
select i.name, i.type, i.object_name, i.object_type, i.usage, i.line, i.col, count(*) over() errcnt_c
4254
from user_identifiers i
4355
join user_identifiers p
@@ -53,4 +65,4 @@ select i.name, i.type, i.object_name, i.object_type, i.usage, i.line, i.col, cou
5365
exec :errcnt := nvl('&errcnt_a',0) + nvl('&errcnt_l',0) + nvl('&errcnt_c',0);
5466

5567
--quit :errcnt
56-
-- exit success
68+
exit :errcnt

old_tests/lib/RunTest.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ declare
1010
l_duration_str varchar2(300) := ', executed in: '||((dbms_utility.get_time - :test_start_time)/100)||' second(s)';
1111
begin
1212
case
13-
when :test_result = ut_utils.tr_success then
13+
when :test_result = ut_utils.gc_success then
1414
:successes_count := :successes_count + 1;
1515
else
1616
dbms_output.put_line('---------------------------------------');

old_tests/ut/ut.run.AcceptsCoverageFileList.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ begin
1919
end loop;
2020
2121
if l_packages_reported = 3 then
22-
:test_result := ut_utils.tr_success;
22+
:test_result := ut_utils.gc_success;
2323
else
2424
for i in 1 .. l_output_data.count loop
2525
dbms_output.put_line(l_output_data(i));

old_tests/ut/ut.run.AcceptsCoverageFileListWithSutePaths.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ begin
1919
end loop;
2020
2121
if l_packages_reported = 3 then
22-
:test_result := ut_utils.tr_success;
22+
:test_result := ut_utils.gc_success;
2323
else
2424
for i in 1 .. l_output_data.count loop
2525
dbms_output.put_line(l_output_data(i));

old_tests/ut/ut.run.AcceptsSutePaths.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ begin
1616
end loop;
1717
1818
if l_packages_executed = 3 then
19-
:test_result := ut_utils.tr_success;
19+
:test_result := ut_utils.gc_success;
2020
else
2121
for i in 1 .. l_output_data.count loop
2222
dbms_output.put_line(l_output_data(i));

old_tests/ut/ut.run.ExecutesSuccesfullyAnEmptySuite.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ begin
1717
into l_result
1818
from table(ut.run('empty_suite',utplsql_test_reporter()));
1919
--Assert
20-
if l_result = ut_utils.tr_error then
21-
:test_result := ut_utils.tr_success;
20+
if l_result = ut_utils.gc_error then
21+
:test_result := ut_utils.gc_success;
2222
else
2323
dbms_output.put_line('expected failure of ''empty_suite'' got: '''||ut_utils.test_result_to_char(l_result)||'''' );
2424
end if;

old_tests/ut/ut.run.FailsToExecuteAnInvalidPackageBody.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ begin
2222
into l_result
2323
from table(ut.run('test_dependencies',utplsql_test_reporter()));
2424
--Assert
25-
if l_result = ut_utils.tr_error then
26-
:test_result := ut_utils.tr_success;
25+
if l_result = ut_utils.gc_error then
26+
:test_result := ut_utils.gc_success;
2727
else
2828
dbms_output.put_line('expected failure of ''test_dependencies'' got: '''||ut_utils.test_result_to_char(l_result)||'''' );
2929
end if;

old_tests/ut/ut.run.WithGivenReporter.ExectutesAllInCurrentSchemaUsingReporter.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ begin
1616
end loop;
1717
1818
if l_packages_executed = 3 then
19-
:test_result := ut_utils.tr_success;
19+
:test_result := ut_utils.gc_success;
2020
else
2121
for i in 1 .. l_num_lines loop
2222
dbms_output.put_line(l_output_data(i));

old_tests/ut/ut.run.WithNoParams.ExecutesAllFromCurrentSchema.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ begin
1616
end loop;
1717
1818
if l_packages_executed = 3 then
19-
:test_result := ut_utils.tr_success;
19+
:test_result := ut_utils.gc_success;
2020
else
2121
for i in 1 .. l_num_lines loop
2222
dbms_output.put_line(l_output_data(i));

0 commit comments

Comments
 (0)